资 源 简 介
void Task_Server(void *pdata) { SOCKET* s; int ei; //存放返回值的变量 int RecvCnt=0; //接收数据个数 uint8 RecvBuff[200]; //接收缓冲区 uint8 RecvBuffP=0; uint8 CanSUCCESS=0; struct sockaddr serveraddr,clientaddr; //sockaddr 结构体由协议栈类型、IP和端口组成 uint32 regaddrBYTE; serveraddr.sin_family = 0; //协议栈类型 serveraddr.sin_addr[0] = MCU_IP[0]; //四位IP地址 serveraddr.sin_addr[1] = MCU_IP[1]; serveraddr.sin_addr[2] = MCU_IP[2]; serveraddr.sin_addr[3] = MCU_IP[3]; serveraddr.sin_port = 4000; //服务器本地端口 s = socket(AF_INET,SOCK_STREAM,TCP_