I would like to see particular C/C++ implementation of such statement ;)
If you know, that message fourcc tag is 4 bytes long and that the data length bytes are at positions 5 and 6, what's wrong then? First you check the received length against the value in header, if it's ok, then you lookup the command by it's fourcc, process it and then jump right at the begining of next command if there is any... In my opinion it's the same for every single command. Correct me if Im wrong.
From: Fredrik Tolf [mailto:[email protected]
Sent: Monday, December 01, 2003 1:28 PM
To: Direct Connect developers
Subject: RE: [dcdev] Re: New Encoding Scheme First
Zdenek Stangl writes:
> - semi-binary header != binary protocol. All I would like to have
> is the fourcc AND length at the begining of message. Everything
> else remains text-based. With such scheme the debugging is still
> simple + the parsing mechanism would be more generic and fast.
I forgot to say, IMHO that would make the parsing algorithm less
generic, since it must treat the command name specially. A generic
algorithm would treat the command just like any other word in the