This description will be divided into two parts. First we??™ll take a brief look at the binary
data system that will be used by all communication, and then we??™ll look at the actual operations
that are available to use. In a real-world situation you??™d probably have to read a spec or
existing client code (in the worst case, COBOL) to find out what this format is.
I hope this description will be a little more readable than either of those alternatives,
especially because the format is designed to not be too hard for you.
The binary data format understands three different things: strings, lists, and integers. I??™ll
use a variation on the Java generics syntax to specify what a specific call looks like. For example,
LIST
, INTEGER> is a list of entries, where the first part of
the entry is a string, the second part is a list of string and integer after each other, and finally
an integer.
In the binary format, a list can be a maximum of 255 entries long. The list begins with one
unsigned byte specifying the length, and then the entries of the list. Because the different data
formats are predefined, and the content of each entry in a list is also predefined, there??™s no
need for any kind of separator between entries. When one entry is finished, the next one
begins.
A String works the same way. Strings can??™t be more than 255 characters long either, and
the binary format is first the byte describing the length, then the actual contents of the strings.
Pages:
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350