Windows Socket Error:10057 是什么意思?(20分)

  • 主题发起人 主题发起人 ysglanguage
  • 开始时间 开始时间
Y

ysglanguage

Unregistered / Unconfirmed
GUEST, unregistred user!
我采用 ServerSocket 和 ClientSocket 相互通信,但是运行时出错。
Windows Socket Error:10057
但是端口已经定义了,请问是什么错了?
 
Socket 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.
 
好像是ServerSocket调用接受函数时出错,
ServerSocket.Socket.ReceiveText 用于接受出错;
应该直接用 Socket.ReceiveText 。
 
仍然感谢你的回答。
 
后退
顶部