头文件
#include <stdio.h>
// 需要第三方的应用
#include <sys/socket.h>// 套接字专用
#include <netinet/in.h> // 套接字通讯协议专属
#include <arpa/inet.h> // 转换网络电讯号与计算数字信号之间的数据
#include <unistd.h> // 关闭网络通讯的专属
// 建设套接字
bool CreateSocket();
// 设定套接字的地址和端口
bool BindSocket(const char *ip, const unsigned short port);
// 设定监听
bool ListenSocket();
// 等待客户端连接
int AcceptClient();
// 接受客户端的问候或提问
int ReciveClient(int nClient, void *pBuffer, int nBufLen);
// 回复数据
int SendClient(int nClient, const void *pBuffer, int bBufLen);
// 关闭所有网络通讯
void CloseServerSocket();