Protocol basics

Two sockets are used. One is for all commands and responses, and the other is simply for transfer of large chunks of binary data (mostly image data).

The basis of the protocol is that the client sends 16 bit binary requests such as TELL_STATUS in network byte order (see Secs. 13.11.4 and 13.11.5), possibly followed by binary parameter data again in network byte order. The server reads these requests, and generates 16 bit binary responses like RESPOND_IDLE in network byte order, again possibly followed by binary parameter data. In order to decrease the overhead of sending single instructions back and forth, requests or responses are packaged in buffers before sending (see Sec. 13.11.3). Each of these buffers is preceded by the commands TELL_BUFFERBYTES (client) or RESPOND_BUFFERBYTES (server) and a 4 byte number indicating the size of the following buffer (see also Sec. 13.11.3). After certain commands these buffers are flushed automatically (even if not filled up entirely):

Holger Fleckenstein 2008-07-08