From 7032fedd41386f8a0b779d234620b473d978f889 Mon Sep 17 00:00:00 2001 From: wangzhengquan <wangzhengquan85@126.com> Date: 星期五, 17 七月 2020 17:43:18 +0800 Subject: [PATCH] req_rep finished --- queue/include/shm_socket.h | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/queue/include/shm_socket.h b/queue/include/shm_socket.h index f14dbc6..2147857 100644 --- a/queue/include/shm_socket.h +++ b/queue/include/shm_socket.h @@ -23,6 +23,12 @@ }; +enum shm_connection_status_t { + SHM_CONN_CLOSED=1, + SHM_CONN_LISTEN=2, + SHM_CONN_ESTABLISHED=3 +}; + typedef struct shm_msg_t { int port; shm_msg_type_t type; @@ -35,6 +41,7 @@ typedef struct shm_socket_t { // 鏈湴port int port; + shm_connection_status_t status; SHMQueue<shm_msg_t> *queue; SHMQueue<shm_msg_t> *remoteQueue; LockFreeQueue<shm_msg_t, DM_Allocator> *messageQueue; @@ -69,7 +76,7 @@ int shm_close_socket(shm_socket_t * socket) ; -int shm_bind(shm_socket_t * socket, int port) ; +int shm_soket_bind(shm_socket_t * socket, int port) ; int shm_listen(shm_socket_t * socket) ; -- Gitblit v1.8.0