fujuntang
2021-09-11 dc01e4cbb01e96d19b470a366bbe648d426ed171
src/net/net_mod_socket_wrapper.h
@@ -67,7 +67,7 @@
 *
 * @return 0是成功, 其他值是失败的错误码
 */
int net_mod_socket_sendto(void *_socket, const void *buf, const int size, const int key);
int net_mod_socket_sendto(void *_socket, const void *buf, const int size, const int key, int reset = 0, int data_set = 0);
/**
 * @brief  发送信息,在指定时间内没发送完成也返回。 
@@ -80,7 +80,7 @@
 *
 * @return 0是成功, 其他值是失败的错误码
 */
int net_mod_socket_sendto_timeout(void *_socket, const void *buf, const int size, const int key, int sec, int nsec);
int net_mod_socket_sendto_timeout(void *_socket, const void *buf, const int size, const int key, int sec, int nsec, int reset = 0, int data_set = 0);
/**
 * @brief 发送信息,无论是否发送完成立刻返回。
@@ -91,7 +91,7 @@
 *
 * @return 0是成功, 其他值是失败的错误码
 */
int net_mod_socket_sendto_nowait(void *_socket, const void *buf, const int size, const int key);
int net_mod_socket_sendto_nowait(void *_socket, const void *buf, const int size, const int key, int reset = 0, int data_set = 0);
/**
 * @brief 等待接收信息,直到有消息接受到才返回
@@ -102,7 +102,7 @@
 * 
 * @return 0是成功, 其他值是失败的错误码
 */
int net_mod_socket_recvfrom(void *_socket, void **buf, int *size, int *key);
int net_mod_socket_recvfrom(void *_socket, void **buf, int *size, int *key, int reset = 0, int data_set = 0);
/**
 * @brief 等待接收信息,在指定的时间内即使没有接受到消息也要返回
@@ -115,7 +115,7 @@
 * 
 * @return 0是成功, 其他值是失败的错误码
 */
int net_mod_socket_recvfrom_timeout(void *_socket, void **buf, int *size, int *key, int sec, int nsec);
int net_mod_socket_recvfrom_timeout(void *_socket, void **buf, int *size, int *key, int sec, int nsec, int reset = 0, int data_set = 0);
/**
 * @brief 等待接收信息,直到有消息接受到才返回
@@ -126,10 +126,12 @@
 * 
 * @return 0是成功,其他值是失败的错误码
 */
int net_mod_socket_recvfrom_nowait(void *_socket, void **buf, int *size, int *key);
int net_mod_socket_recvfrom_nowait(void *_socket, void **buf, int *size, int *key, int reset = 0, int data_set = 0);
void net_mod_socket_int_set(void * _socket, int data);
void net_mod_socket_svr_set(void * _socket, int data);
int net_mod_socket_int_get(void * _socket);
int net_mod_socket_svr_get(void * _socket);
/**
 * @brief 跨机器发送消息并接受返回的应答消息,直到发送完成才返回