⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcpexample.h

📁 嵌入式系统中实现双机通信的程序
💻 H
字号:
/* tcpExample.h - header used by both TCP server and client examples */  
/*定义结构体,保存待传输的信息,是否回应,以及信息长度*/

#define SERVER_PORT_NUM        7901  /* server's port number for bind() */ 
#define SERVER_WORK_PRIORITY   100    /* priority of server's work task */ 
#define SERVER_STACK_SIZE      10000  /* stack size of server's work task */ 
#define SERVER_MAX_CONNECTIONS  4  /* max clients connected at a time */ 
#define REQUEST_MSG_SIZE       1024   /* max size of request message */ 
#define REPLY_MSG_SIZE			500    /* max size of reply message */ 

/* structure for requests from clients to server */ 
struct request 
    { 
    int reply;                         /* TRUE = request reply from server */  
    int msgLen;                        /* length of message text */ 
    char message[REQUEST_MSG_SIZE];    /* message buffer */  
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -