ASockLib
1.0.0
A simple and easy cross-platform c++ socket server/client framework especially convenient for handling TCP fixed-length header and variable-length body. Of course, it also supports udp and domain socket.
dependency : CumBuffer.
//See the sample folder for all examples.
//this is an inheritance usage.
//you can find composition usage and udp, domain socket example too.
// msg_defines.h
// user specific data
typedef struct _ST_MY_CHAT_HEADER_
{
char msg_len[10+1];
} ST_MY_HEADER ;
#define CHAT_HEADER_SIZE sizeof(ST_MY_HEADER)