Protocol is based on protocol TCP. It is possible to use raw TCP packets or to use SSL for data encryption. Transferred data are organized in the frames. Frame is base unit for higher protocol layers. Each frame can be used to transfer data file, method call, testing packet etc.
Basic structure of the frame is on following picture:
0123 4567 8901 234........... END 4 bytes MGID FRTP FRSZ .....FRDT......FRCS
Table 1. Structure of the Frame
Item | Size | Description |
---|---|---|
MGID | 4 | Frame Identifier (magic id), expected value 0xE1 0x87 0x05 0xA3 |
FRTP | 4 | Frame type, number |
FRSZ | 4 | Size of data in the frame (number of bytes) |
FRDT | defined in FRSZ | Frame data, size is defined in FRSZ |
FRCS | 4 | Checksum of the frame, includes MGID,FRTP,FRSZ,FRDT This is not currently used. |
Protocol is initialized in 3 steps:
-
Connected - waiting for Hello packet
-
Introduced - after hello packet and waiting for authorization
-
Authorized
Protocol have to be in Authorized to be able to transfer documents (the section called “Authorization”). When protocol is authorized there are no other required steps. However transfered document or file has its own transfer states.
Numeric values (MGID, FRTP, FRSZ, ...) are transffered as LittleEndian (typicaly used on x86).
Note
Protocol implementation can limit maximal size of the frame (FRSZ). We recommend to limit frame size for security reasons.