linux下C++ socket网络编程( 十 )

// 缓冲区大小65535

#define BUF_SIZE 0xFFFF

// 新用户登录后的欢迎信息

#define SERVER_WELCOME \"Welcome you join to the chat room! Your chat ID is: Client #%d\"

// 其他用户收到消息的前缀

#define SERVER_MESSAGE \"ClientID %d say >> %s\"

#define SERVER_PRIVATE_MESSAGE \"Client %d say to you privately >> %s\"

#define SERVER_PRIVATE_ERROR_MESSAGE \"Client %d is not in the chat room yet~\"

// 退出系统

#define EXIT \"EXIT\"

// 提醒你是聊天室中唯一的客户

#define CAUTION \"There is only one int the char room!\"

// 注册新的fd到epollfd中

推荐阅读