| | |
| | | #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" |
| | |
| | | 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) |
| | | |
| | | |
| | | // 请求头 |
| | |
| | | */ |
| | | 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的时间后返回 |
| | |
| | | // 接受信息超时返回。 @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 发送给谁 |