struct GatewayProtocol
{
unsigned int pack_len,
unsigned char cmd,//命令字
unsigned int local_ip,
unsigned short local_port,
unsigned int client_ip,
unsigned short client_port,
unsigned int client_id,
unsigned char flag,
unsigned int ext_len,
char[ext_len] ext_data,
char[pack_length-HEAD_LEN] body//包体
}