3.5 The Fragment binarysocket

The only pattern defined is BinarySocket. BinarySocket inherits from BasicSocket.

endOfData returns true if no data is immediately available for reading. putInt and getInt are used to transmit a single integer. The integer is transmitted in big-endian format. This makes communication across little- and big-endian machines of integers easy.

putRep and getRep sends and receives instances of ExtendedRepstream. This is a generic container for arbitrary blocks of data, in particular it is possible to put texts and integers into it and read them out again. When receiving data into an ExtendedRepstream with getRep, the ExtendedRepstream will automatically be extended in case the received amount of data exceeds its current capacity.

len      header   data
|--------|--------|---------------------------------|

putRepObj and getRepObj are used to send and receive instances of the pattern RepetitionObject. The protocol for transmitting RepetitionObjects is a little different from the one used with ExtendedRepstream objects: there is no header field, and the length field is the first element in the repetition from the repetitionObject, i.e. repetitionObjects have their length built-in.

len      data
|--------|---------------------------------|
Otherwise, it is like the protocol for ExtendedRepstream objects.


Process Libraries - Reference Manual
© 1994-2002 Mjølner Informatics
[Modified: Friday October 20th 2000 at 14:22]