| | |
| | | |
| | | }; |
| | | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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) ; |
| | | |