tmp
wangzhengquan
2020-07-17 b190a6af38f077b1754b4cb0cdd6c1f6e1494aba
queue/shm_socket.c
@@ -68,6 +68,7 @@
         client_socket->remoteQueue->push_timeout(close_msg, &timeout);
         delete client_socket->remoteQueue;
         client_socket->remoteQueue=NULL;
         delete client_socket->messageQueue;
         client_socket->messageQueue=NULL;
         socket->clientSocketMap->erase(iter);
@@ -89,9 +90,7 @@
   return _shm_close_socket(socket, true);
}
int shm_soket_bind(shm_socket_t * socket, int port) {
int shm_socket_bind(shm_socket_t * socket, int port) {
   shm_socket_t * _socket = (shm_socket_t *) socket;
   _socket -> port = port;
   return 0;
@@ -308,10 +307,10 @@
int shm_send(shm_socket_t *socket, const void *buf, const int size) {
   // hashtable_t *hashtable = mm_get_hashtable();
   if(socket->remoteQueue == NULL) {
      err_msg(errno, "当前客户端无连接!");
      return -1;
   }
   // if(socket->remoteQueue == NULL) {
   //    err_msg(errno, "当前客户端无连接!");
   //    return -1;
   // }
   shm_msg_t dest;
   dest.type=SHM_COMMON_MSG;
   dest.port = socket->port;