| | |
| | | |
| | | }; |
| | | |
| | | struct net_mod_recv_err_t |
| | | { |
| | | char host[NI_MAXHOST]; |
| | | int port; |
| | | int key; |
| | | int code; |
| | | }; |
| | | |
| | | class NetModSocket { |
| | | |
| | | |
| | |
| | | NetConnPool* _get_pool(); |
| | | |
| | | //读取返回信息 |
| | | int read_response(int clientfd, net_mod_recv_msg_t *recv_msg); |
| | | int read_response(int clientfd, net_mod_recv_msg_t *recv_msg, net_mod_recv_err_t *err_arr); |
| | | // 发送请求信息 |
| | | int write_request(int clientfd, net_mod_request_head_t &request_head, const void *send_buf, int send_size, const void *topic_buf, int topic_size); |
| | | |
| | |
| | | int pub_timeout( char *topic, int topic_size, void *content, int content_size, int key, int sec, int nsec); |
| | | int pub_nowait( char *topic, int topic_size, void *content, int content_size, int key); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取soket key |