| | |
| | | return sockt->recvfrom_nowait(buf, size, key); |
| | | } |
| | | |
| | | |
| | | int net_mod_socket_recvandsend(void *_socket, void **recvbuf, int *recvsize, int *key, recv_callback_fn callback) { |
| | | NetModSocket *sockt = (NetModSocket *)_socket; |
| | | return sockt->recvandsend( recvbuf, recvsize, key, callback); |
| | | |
| | | } |
| | | |
| | | int net_mod_socket_recvandsend_timeout(void *_socket, void **recvbuf, int *recvsize, int *key, recv_callback_fn callback, |
| | | int sec, int nsec ) { |
| | | NetModSocket *sockt = (NetModSocket *)_socket; |
| | | struct timespec timeout = {sec, nsec}; |
| | | return sockt->recvandsend_timeout( recvbuf, recvsize, key, callback, &timeout); |
| | | } |
| | | |
| | | int net_mod_socket_recvandsend_nowait(void *_socket, void **recvbuf, int *recvsize, int *key, recv_callback_fn callback) { |
| | | NetModSocket *sockt = (NetModSocket *)_socket; |
| | | return sockt->recvandsend_nowait( recvbuf, recvsize, key, callback); |
| | | } |
| | | |
| | | |
| | | int net_mod_socket_sendandrecv(void *_socket, net_node_t *node_arr, int arrlen, void *send_buf, int send_size, |
| | | net_mod_recv_msg_t ** recv_arr, int *recv_arr_size){ |
| | | NetModSocket *sockt = (NetModSocket *)_socket; |
| | | return sockt->sendandrecv(node_arr, arrlen, send_buf, send_size, recv_arr, recv_arr_size); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 如果建立连接的节点没有接受到消息等待timeout的时间后返回 |
| | |
| | | NetModSocket *sockt = (NetModSocket *)_socket; |
| | | return sockt->sendandrecv_nowait(node_arr, arrlen, send_buf, send_size, recv_arr, recv_arr_size); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |