Ämne:
SV: [dcdev] Re: New Encoding Scheme First
Från:
John Bäckstrand <[email protected]>
Datum:
2003-11-28 9:23
Till:
"'Direct Connect developers'" <[email protected]>

- for commands format i would prefer either
  a) short fourcc header for every command with command type and
  data length. Therefore no command separator and no
  newline/space/or_whatever escaping is needed (I know, the
  byte-order differences on various OSes but hey, sockets
  implementation deals with the same problem and it's working
  fine... htons, ntohl etc...  what's faster? Swapping of two bytes
  from the header or parsing the data for [end] separator? Not all
  messages are sent in one piece...)
  or b) let the command is zero-terminated string without length in
  the header. But then we are back in searching for data-end.

I do not agree with you. Although binary protocols admittedly have advantages, it isn't that hard to implement quoting anyway, so why notsimplify debugging and monitoring by using a text-based protocol instead? When it comes to using CPU power, there are far greater problems in a DC implementation than protocol parsing. Like searching, for example.

Sure, quoting aint hard. And btw, do you consider the protocol binary
because it has a binary field that specifies length of packets? I dont. I do
still think the content should be text. It wont be hard to debug.

---
John Bäckstrand

-- 
DC Developers mailinglist
http://3jane.ashpool.org/cgi-bin/mailman/listinfo/dcdev