Ämne: Re: [dcdev] New Encoding Scheme First |
Från: eric |
Datum: 2003-10-27 8:29 |
Till: Direct Connect developers |
The message encoding might look something like
<command>:<argument>:<argument>:<argument>
where <argument> was \ escaped to protect from internal | or :'s and
command was defined to never contain : or |. This way, you could always
read a block of bytes into a list/array of arguments with the same decoding
rules.
that acts on or generates a message, but should have to edit the code that
encodes/decodes messages.
Requirements would be
- EVERY hub that supports the new encoding scheme MUST support
the old scheme
- Every message is encoded/decoded with the same set of rules
- No binary values
- One-to-one mapping from old messages to new messages
- One protocol addition. A new message 'Supports' that identifies
the commands a client supports sent immediately after it is decided
that the new encoding method is being used.
So in the end, I would really prefer a new encoding scheme with a defined
way of extending it (supports).