msg_queue.h
来自「linux下的消息队列的一些函数封装,包括消息队列的创建,发送消息,接受消息,清」· C头文件 代码 · 共 25 行
H
25 行
#ifndef _MSG_QUEUE_H_
#define _MSG_QUEUE_H_
#define MSGQUE_RECV_TIMEOUT 1000
#define MAX_MSGQUE_LENGTH 4096
#define SEND_RETRY 3
typedef struct {
long mtype;
char mtext[MAX_MSGQUE_LENGTH];
}T_MsgBuf;
int OpenMsgQueue (char * path);
int SendMsg (int msgId, long type, char *buf, int len);
int IsMsgReady (int msgId, long mtype);
int ReceiveMsg (int msgId, long type, char * buf, int length);
int SendAndReceiveMsg (int SendId, int RecvId, char *SendBuffer, int SendLen, int sendType,
char *ReceiveBuffer, int ReceiveLen, int ReceiveType, int TimeOut);
int ClearMsg (int msgId, int type);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?