I have client-server application when communicotion by simple binary protocol. The binary protocol have 12 byte header (see code) when four byte is length of data [datasize] and data block size of datasize.
struct header {
int32_t message_type;
int32_t message_id;
int32_t data_size;
};
dataflow:
header | data | header | data |
How to receive binary data from client by libuv? Do You know examples of processing binary data protocol by libuv?