| | |
| | | * @key 发送给谁 |
| | | * @return 0 成功, 其他值 失败的错误码 |
| | | */ |
| | | int ShmModSocket::sendto(const void *buf, const int size, const int key, const struct timespec *timeout, int flag) { |
| | | int rv = shm_sendto(shm_socket, buf, size, key, timeout, flag); |
| | | int ShmModSocket::sendto(const void *buf, const int size, const int key, const struct timespec *timeout, int flag, int reset, int data_set) { |
| | | int rv = shm_sendto(shm_socket, buf, size, key, timeout, flag, reset, data_set); |
| | | if(rv == 0) { |
| | | logger->debug("ShmModSocket::sendto: %d sendto %d success.\n", get_key(), key); |
| | | return 0; |
| | |
| | | * @key 从谁哪里收到的信息 |
| | | * @return 0 成功, 其他值 失败的错误码 |
| | | */ |
| | | int ShmModSocket::recvfrom( void **buf, int *size, int *key, const struct timespec *timeout, int flag) { |
| | | int ShmModSocket::recvfrom( void **buf, int *size, int *key, const struct timespec *timeout, int flag, int reset, int data_set) { |
| | | |
| | | int rv = shm_recvfrom(shm_socket, buf, size, key, timeout, flag); |
| | | int rv = shm_recvfrom(shm_socket, buf, size, key, timeout, flag, reset, data_set); |
| | | |
| | | if(rv == 0) { |
| | | logger->debug("ShmModSocket::recvfrom: %d recvfrom %d success.\n", get_key(), *key); |