gobangsrv.h
来自「一个Linux下的五子棋对战游戏」· C头文件 代码 · 共 48 行
H
48 行
#ifndef chatroom_h#define chatroom_h#include <stdio.h>#include <string.h>#include <sys/types.h>#include <sys/wait.h>#include <sys/socket.h>#include <sys/stat.h>#include <netinet/in.h>#include <arpa/inet.h>#include <errno.h>#include <fcntl.h>#include <iostream>#include <signal.h>#include <unistd.h>#include <vector>#include <sys/select.h>#include <utility>#define F_NEW 0#define F_CONNETING 1#define F_ESTABLISHED 2#define F_LEAVE 4#define BLACK 0x01#define WHITE 0x02#define ALL 0x04#define FLAG_INFO 0x10#define NAME_INFO 0x11#define POS_INFO 0x12#define LEAVE_INFO 0x13#define CHAT_INFO 0X14#define VIC_INFO 0x15#define WRONG_INFO 0x40#define WRONG_SIDE 0x41#define WRONG_POSITION 0x42#define CHESSBOARD_EMPYT 0x30const unsigned int MAX_LEN = 1500;const unsigned int MAX_CLNT = 100;const unsigned int BACKLOG = 10;#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?