next up previous contents
Next: About this document ... Up: Protocol Previous: Message types   Contents

Message field implementation

In the body of the message there are two types of fields, one type is UIN which is implemented as a regular unsigned long number, the second type is text fields. These include name fields and passwords.

For the text fields we needed to come up with a new structure since if we just sent the string, we wouldn't know where the string ends and the next field begins.

Therefore a text field is composed to two sub-fields:

  1. String size - the total size of the null-terminated string (including the NULL). This is a 4 bytes field (unsigned long).

  2. Text - this is a variable length null-terminated string (char[]).



Zvika Brakerski 2001-05-09