WinSock Error Codes
The following error codes apply to the WinSock ActiveX Controls.
Error Code Error Message
10004 The operation is canceled.
10013 The requested address is a broadcast address, but flag is not t.
10014 Invalid argument.
10022 Socket not bound, invalid address or listen is not invoked prior to accept.
10024 No more file descriptors are available, accept queue is empty.
10035 Socket is non-blocking and the specified operation will block.
10036 A blocking Winsock operation is in progress.
10037 The operation is completed. No blocking operation is in progress.
10038 The descriptor is not a socket.
美国阿拉巴马州10039 Destination address is required.
10040 The datagram is too large to fit into the buffer and is truncated.
10041 The specified port is the wrong type for this socket.
10042 Option unknown, or unsupported.
pdf加页码
10043 The specified port is not supported.
旅游鞋10044 Socket type not supported in this address family.
10045 Socket is not a type that supports connection oriented rvice.
10047 Address Family is not supported.
10048 Address in u.
10049 Address is not available from the local machine.
10050 Network subsystem failed.
10051 The network cannot be reached from this host at this time.
10052 Connection has timed out when SO_KEEPALIVE is t.
10053 Connection is aborted due to timeout or other failure.
10054 The connection is ret by remote side.
10055 No buffer space is available.
10056 Socket is already connected.
10057 Socket is not connected.
10058 Socket has been shut down.
10060 The attempt to connect timed out.
10061 Connection is forcefully rejected.
10201 Socket already created for this object.深呼吸英语
10202 Socket has not been created for this object.
11001 Authoritative answer: Host not found.
11002 Non-Authoritative answer: Host not found.
公司经营模式11003 Non-recoverable errors.
诚实守信的名言警句11004 Valid name, no data record of requested type.
在打开 Socket 时也要捕获异常
try
ClientSocket.Open;
except
MessageBox(MainForm.Handle,'Error connecting to this address','Connect',MB_ICONEXCLAMATION);
end;
在 OnError 中最后要将 ErrorCode 置为 0
if ErrorEvent=eeConnect then女人如何丰胸
begin
Socket.Clo;
MessageBox(MainForm.Handle,'Error connecting to this address','Connect',MB_ICONEXCLAMATION);
end
el if ErrorEvent=eeSend then
风景的句子唯美短句
Socket.Clo;
ErrorCode:=0;
你可能无做第一步
而这样也可以区分你所说的两种情况
1.第二步 OnError 就是此地址上无任何主机存在 ,到超时就触发 OnError 事件
2.第一步捕捉到异常就是有主机但被扫描的特定端口不存在