[Y-devel] Proposal: message structure change

Dmitry Platonov shadowjack at mail.ru
Fri Feb 27 01:03:52 GMT 2004


On Thu, Feb 26, 2004 at 03:48:50PM +0000, Richard Hills wrote:
> On Thu, 2004-02-26 at 23:36, Dmitry Platonov wrote:
> > Current implementation of messages involves parsing at client side, and makes
> > difficult to do know type of fields in message. I'd like to see 'data' splitted
> > into fields, with types, (optional) names and values. This will do my attempt in internalization much easier because i can know what things must be converted
> > and what must not. More, it will get rid of most of this str* functions in code,
> > and remove much duplication.
> 
>     If I understand you correctly - the messages are already constructed
> out of different fields, seperated by a '\x1c' character in the "data"
> section of the message. However, most of the client libs at the moment
> rely on the application constructing the list of parameters seperated by
> this seperator character, making it more difficult to program.
>     What I think you're suggesting is the client functions (in libYc++ for
> example) should accept the different fields, typed properly, and then
> combine them before sending the message to the server. This should be
> done in the client libs however, and not in the protocol,

Now fields are separated by zeros, and name and value are separated by
'\x1c'. I'm proposing addition of types, and separating fields with help of 
headers wich declares, among other things, length and offset of every field.
So, fields will be able to have zero and '\x1c' bytes in their values.

> Richard Hills



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved