| | |
| | | */ |
| | | int dgram_mod_sub(void * _socket, void *topic, int size, int port){ |
| | | dgram_mod_socket_t * socket = (dgram_mod_socket_t *) _socket; |
| | | return socket->m_socket->sub(topic, size, port); |
| | | return socket->m_socket->sub((char *)topic, size, port); |
| | | } |
| | | // 超时返回。 @sec 秒 , @nsec 纳秒 |
| | | int dgram_mod_sub_timeout(void * _socket, void *topic, int size, int port, int sec, int nsec){ |
| | | dgram_mod_socket_t * socket = (dgram_mod_socket_t *) _socket; |
| | | struct timespec timeout = {sec, nsec}; |
| | | return socket->m_socket->sub_timeout(topic, size, port, &timeout); |
| | | return socket->m_socket->sub_timeout((char *)topic, size, port, &timeout); |
| | | } |
| | | int dgram_mod_sub_nowait(void * _socket, void *topic, int size, int port){ |
| | | dgram_mod_socket_t * socket = (dgram_mod_socket_t *) _socket; |
| | | return socket->m_socket->sub_nowait(topic, size, port); |
| | | return socket->m_socket->sub_nowait((char *)topic, size, port); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | int dgram_mod_desub(void * _socket, void *topic, int size, int port){ |
| | | dgram_mod_socket_t * socket = (dgram_mod_socket_t *) _socket; |
| | | return socket->m_socket->desub(topic, size, port); |
| | | return socket->m_socket->desub((char *)topic, size, port); |
| | | } |
| | | // 超时返回。 @sec 秒 , @nsec 纳秒 |
| | | int dgram_mod_desub_timeout(void * _socket, void *topic, int size, int port, int sec, int nsec){ |
| | | dgram_mod_socket_t * socket = (dgram_mod_socket_t *) _socket; |
| | | struct timespec timeout = {sec, nsec}; |
| | | return socket->m_socket->desub_timeout(topic, size, port, &timeout); |
| | | return socket->m_socket->desub_timeout((char *)topic, size, port, &timeout); |
| | | } |
| | | int dgram_mod_desub_nowait(void * _socket, void *topic, int size, int port){ |
| | | dgram_mod_socket_t * socket = (dgram_mod_socket_t *) _socket; |
| | | return socket->m_socket->desub_nowait(topic, size, port); |
| | | return socket->m_socket->desub_nowait((char *)topic, size, port); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | int dgram_mod_pub(void * _socket, void *topic, int topic_size, void *content, int content_size, int port){ |
| | | dgram_mod_socket_t * socket = (dgram_mod_socket_t *) _socket; |
| | | return socket->m_socket->pub(topic, topic_size, content, content_size, port); |
| | | return socket->m_socket->pub((char *)topic, topic_size, content, content_size, port); |
| | | } |
| | | // 超时返回。 @sec 秒 , @nsec 纳秒 |
| | | int dgram_mod_pub_timeout(void * _socket, void *topic, int topic_size, void *content, int content_size, int port, int sec, int nsec){ |
| | | dgram_mod_socket_t * socket = (dgram_mod_socket_t *) _socket; |
| | | struct timespec timeout = {sec, nsec}; |
| | | return socket->m_socket->pub_timeout(topic, topic_size, content, content_size, port, &timeout); |
| | | return socket->m_socket->pub_timeout((char *)topic, topic_size, content, content_size, port, &timeout); |
| | | } |
| | | int dgram_mod_pub_nowait(void * _socket, void *topic, int topic_size, void *content, int content_size, int port){ |
| | | dgram_mod_socket_t * socket = (dgram_mod_socket_t *) _socket; |
| | | return socket->m_socket->pub_nowait(topic, topic_size, content, content_size, port); |
| | | return socket->m_socket->pub_nowait((char *)topic, topic_size, content, content_size, port); |
| | | } |
| | | |
| | | |