请教:我的socket连接成功,为啥在发送数据或者接收数据的时候会出现WSAENOTCONN的错误呢?是偶尔出现,但总体上十个概率很高的事件,真不知道是怎么回事啦。。

解决方案 »

  1.   

    WSAENOTCONN的错误  ?
      

  2.   

    是调用recv或者send的时候出现的,快崩溃啦
      

  3.   

    WSAENOTCONN 
    10057Socket is not connected. 
    A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using sendto) no address was supplied. Any other type of operation might also return this error—for example, setsockopt setting SO_KEEPALIVE if the connection has been reset
      

  4.   

    肯定是连接成功的,connect函数返回都正确了。而且也能ping通的