MESSAGE FORMAT message format (skeleton) is as follows: 2 bytes - message length 1 byte - message type: either of CHAN_GET, CHAN_PUT, CHAN_LIST, CHAN_CLOSE, CHAN_GRANTED, CHAN_NOTGRANTED CHAN_DATA variable bytes - message contents MESSAGE CONTENTS CHAN_GET: (request) variable bytes - file name CHAN_PUT: (request) variable bytes - file name CHAN_LIST: (request) (no auxiliary data) CHAN_CLOSE: (request - information from server that it's closing some channel) 1 byte - channel number CHAN_GRANTED: (reply to CHAN_GET/CHAN_PUT/CHAN_LIST) 1 byte - channel number CHAN_NOTGRANTED: (reply to CHAN_GET/CHAN_PUT/CHAN_LIST) (no auxiliary data) All replies to CHAN_GET/CHAN_PUT/CHAN_LIST are tranferred in CHAN_DATA messages, they look like this: 1 byte - channel number 1 byte - response code (one of CH_CODE_OK / CH_CODE_ERROR) variable bytes - reply data sample data message: [L][L][T][N][C][.....] LL - message length T - message type (CHAN_DATA) N - channel number C - code ...., - data DATA IN REPLY TO LIST REQUEST [fn1....][fn2....][fn3....] fn - filenames in ASCIIZ format