From b861de29176891657cc96631ddbfb4ea9e114a42 Mon Sep 17 00:00:00 2001 From: Fu Juntang <StrongTiger_001@163.com> Date: 星期一, 30 八月 2021 17:52:23 +0800 Subject: [PATCH] re-structure the communication work flow. --- src/net/net_mod_socket.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/net/net_mod_socket.h b/src/net/net_mod_socket.h index 6289fa6..d8e53ae 100644 --- a/src/net/net_mod_socket.h +++ b/src/net/net_mod_socket.h @@ -3,6 +3,7 @@ #include "usg_common.h" #include "shm_mod_socket.h" #include "socket_io.h" +#include "proc_def.h" #include <poll.h> #include "socket_def.h" #include "net_conn_pool.h" @@ -17,7 +18,7 @@ int key; }; -#define NET_MODE_REQUEST_HEAD_LENGTH (NI_MAXHOST + 6 * sizeof(uint32_t)) +#define NET_MODE_REQUEST_HEAD_LENGTH sizeof(net_mod_request_head_t) // 璇锋眰澶� @@ -118,8 +119,8 @@ */ int force_bind( int key); - - + int bind_proc_id(char *buf, int len); + int reg(void *pData, int len, void **buf, int *size, const int timeout_ms, int flag); /** * 濡傛灉寤虹珛杩炴帴鐨勮妭鐐规病鏈夋帴鍙楀埌娑堟伅绛夊緟timeout鐨勬椂闂村悗杩斿洖 @@ -166,7 +167,6 @@ // 鎺ュ彈淇℃伅瓒呮椂杩斿洖銆� @sec 绉� 锛� @nsec 绾崇 int recvfrom_timeout( void **buf, int *size, int *key, int sec, int nsec); int recvfrom_nowait( void **buf, int *size, int *key); - /** * 鏈湴鍙戦�佽姹備俊鎭苟绛夊緟鎺ユ敹搴旂瓟 * @key 鍙戦�佺粰璋� -- Gitblit v1.8.0