| | |
| | | */ |
| | | int ShmModSocket::sendandrecv(const void *send_buf, const int send_size, const int send_key, |
| | | void **recv_buf, int *recv_size, const struct timespec *timeout, int flag){ |
| | | return shm_sendandrecv(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, timeout, flag); |
| | | int rv = shm_sendandrecv(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, timeout, flag); |
| | | |
| | | if(rv == 0) { |
| | | logger->debug("ShmModSocket::sendandrecv: sendandrecv to %d success.\n", send_key); |
| | | return 0; |
| | | } |
| | | |
| | | logger->debug("ShmModSocket::sendandrecv : sendandrecv to %d failed %s", send_key, bus_strerror(rv)); |
| | | return rv; |
| | | } |
| | | |
| | | // 超时返回。 @sec 秒 , @nsec 纳秒 |
| | | int ShmModSocket::sendandrecv_unsafe(const void *send_buf, const int send_size, const int send_key, |
| | | void **recv_buf, int *recv_size, const struct timespec *timeout, int flag){ |
| | | return shm_sendandrecv_unsafe(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, timeout, flag); |
| | | } |
| | | // // 超时返回。 @sec 秒 , @nsec 纳秒 |
| | | // int ShmModSocket::sendandrecv_unsafe(const void *send_buf, const int send_size, const int send_key, |
| | | // void **recv_buf, int *recv_size, const struct timespec *timeout, int flag){ |
| | | // return shm_sendandrecv_unsafe(shm_socket, send_buf, send_size, send_key, recv_buf, recv_size, timeout, flag); |
| | | // } |
| | | |
| | | /** |
| | | * 订阅指定主题 |