| | |
| | | } |
| | | |
| | | shm_msg_t src; |
| | | //logger.debug("shm_recvfrom pop before"); |
| | | // printf("shm_recvfrom pop before"); |
| | | if (socket->queue->pop(src)) { |
| | | void * _buf = malloc(src.size); |
| | | memcpy(_buf, src.buf, src.size); |
| | |
| | | *size = src.size; |
| | | *port = src.port; |
| | | mm_free(src.buf); |
| | | //logger.debug("shm_recvfrom pop after"); |
| | | // printf("shm_recvfrom pop after"); |
| | | return 0; |
| | | } else { |
| | | return -1; |
| | |
| | | if( iter != socket->clientSocketMap->end() ) { |
| | | socket->clientSocketMap->erase(iter); |
| | | } |
| | | //free((void *)client_socket); |
| | | free((void *)client_socket); |
| | | |
| | | } |
| | | |