10058<o:p></o:p>
|
WSAESHUTDOWN<o:p></o:p>
|
Cannot send after socket shutdown. <o:p></o:p>
A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call. By calling shutdown a partial close of a socket is requested, which is a signal that sending or receiving or both has been discontinued. <o:p></o:p>
|
10060<o:p></o:p>
|
WSAETIMEDOUT<o:p></o:p>
|
Connection timed out. <o:p></o:p>
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.<o:p></o:p>
|
10061<o:p></o:p>
|
WSAECONNREFUSED<o:p></o:p>
|
Connection refused. <o:p></o:p>
No connection could be made because the target machine actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host - i.e. one with no server application running. <o:p></o:p>
|
10064<o:p></o:p>
|
WSAEHOSTDOWN<o:p></o:p>
|
Host is down. <o:p></o:p>
A socket operation failed because the destination host was down. A socket operation encountered a dead host. Networking activity on the local host has not been initiated. These conditions are more likely to be indicated by the error WSAETIMEDOUT. <o:p></o:p>
|
10065<o:p></o:p>
|
WSAEHOSTUNREACH<o:p></o:p>
|
No route to host. <o:p></o:p>
A socket operation was attempted to an unreachable host. See WSAENETUNREACH<o:p></o:p>
|
10067<o:p></o:p>
|
WSAEPROCLIM<o:p></o:p>
|
Too many processes. <o:p></o:p>
A Windows Sockets implementation may have a limit on the number of applications that may use it simultaneously. WSAStartup may fail with this error if the limit has been reached. <o:p></o:p>
|
10091<o:p></o:p>
|
WSASYSNOTREADY<o:p></o:p>
|
Network subsystem is unavailable. <o:p></o:p>
This error is returned by WSAStartup if the Windows Sockets implementation cannot function at this time because the underlying system it uses to provide network services is currently unavailable. Users should check: <o:p></o:p>
that the appropriate Windows Sockets DLL file is in the current path, <o:p></o:p>
that they are not trying to use more than one Windows Sockets implementation simultaneously. If there is more than one WINSOCK DLL on your system, be sure the first one in the path is appropriate for the network subsystem currently loaded. <o:p></o:p>
the Windows Sockets implementation documentation to be sure all necessary components are currently installed and configured correctly. <o:p></o:p>
|
10092<o:p></o:p>
|
WSAVERNOTSUPPORTED<o:p></o:p>
|
WINSOCK.DLL version out of range. <o:p></o:p>
The current Windows Sockets implementation does not support the Windows Sockets specification version requested by the application. Check that no old Windows Sockets DLL files are being accessed. <o:p></o:p>
|
10093<o:p></o:p>
|
WSANOTINITIALISED<o:p></o:p>
|
Successful WSAStartup not yet performed. <o:p></o:p>
Either the application hasn't called WSAStartup or WSAStartup failed. The application may be accessing a socket which the current active task does not own (i.e. trying to share a socket between tasks), or WSACleanup has been called too many times. <o:p></o:p>
|
10094<o:p></o:p>
|
WSAEDISCON<o:p></o:p>
|
Graceful shutdown in progress. <o:p></o:p>
Returned by WSARecv and WSARecvFrom to indicate the remote party has initiated a graceful shutdown sequence.<o:p></o:p>
|
10109<o:p></o:p>
|
WSATYPE_NOT_FOUND<o:p></o:p>
|
Class type not found. <o:p></o:p>
The specified class was not found. <o:p></o:p>
|
11001<o:p></o:p>
|
WSAHOST_NOT_FOUND<o:p></o:p>
|
Host not found. <o:p></o:p>
No such host is known. The name is not an official hostname or alias, or it cannot be found in the database(s) being queried. This error may also be returned for protocol and service queries, and means the specified name could not be found in the relevant database.<o:p></o:p>
|
11002<o:p></o:p>
|
WSATRY_AGAIN<o:p></o:p>
|
Non-authoritative host not found. <o:p></o:p>
This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server. A retry at some time later may be successful. <o:p></o:p>
|
11003<o:p></o:p>
|
WSANO_RECOVERY<o:p></o:p>
|
This is a non-recoverable error. <o:p></o:p>
This indicates some sort of non-recoverable error occurred during a database lookup. This may be because the database files (e.g. BSD-compatible HOSTS, SERVICES or PROTOCOLS files) could not be found, or a DNS request was returned by the server with a severe error.<o:p></o:p>
|
11004<o:p></o:p>
|
WSANO_DATA<o:p></o:p>
|
Valid name, no data record of requested type. <o:p></o:p>
The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. The usual example for this is a hostname -> address translation attempt (using gethostbyname or WSAAsyncGetHostByName) which uses the DNS (Domain Name Server), and an MX record is returned but no A record - indicating the host itself exists, but is not directly reachable. <o:p></o:p>
|
相关推荐
在Windows系统中,可以通过命令提示符下的`net helpmsg [错误代码]`来获取特定错误码的详细解释。例如,如果想查询错误代码10060的信息,只需在命令行中输入`net helpmsg 10060`即可。 #### 二、常见错误代码详解 ...
这些错误码可以分为四个部分,即 Windows Sockets 实现返回的错误码、Berkeley Sockets 定义的错误码、Windows Sockets 扩充的错误码和 getXbyY() 函数返回的错误码。 了解 Windows Socket 错误码非常重要,因为...
这些错误代码不仅包括 Windows Sockets 实现中特有的错误,还包含了传统的 Berkeley Sockets 定义的错误码,以确保程序的可移植性和兼容性。 下面将详细介绍一些常见的 SocketError 错误代码及其含义。 #### ...
它的返回值表示接收到的字节数,如果返回`SOCKET_ERROR`,则表明发生了错误。 当`recvfrom()`返回`SOCKET_ERROR`时,我们的重启机制将发挥作用。错误处理通常包括使用`WSAGetLastError()`获取错误代码,然后根据...
7. Socket error 10035 - 资源暂时不可用:该错误码表示套接字操作所需的资源暂时不可用。 8. Socket error 10036 - 操作现在进行中:该错误码表示套接字操作现在正在进行中。 9. Socket error 10037 - 操作已经在...
4. "Can't create TCP-IP socket (10106)_端口绑定失败=端口冲突.url":虽然10106不是我们讨论的24,但这个错误码表明端口绑定失败,可能是由于端口已经被其他进程占用,也可能是另一个相关的问题。 5. "Linux errno...
2. ECONNREFUSED:当远程服务器对SYN数据段发送RST数据段时,表示在指定端口没有服务进程等待连接,此时connect函数立即返回错误。 3. EHOSTUNREACH或ENETUNREACH:如果路由中产生了“目的地不可到达”的ICMP错误,...
当 SP 调用深讯 API 时,也可能出现一些错误码,例如 ERROR_SOCKET_CREATE、ERROR_CONNECT、ERROR_SOCKET_WRITE 等,这些错误码都是由于网络连接或数据传输过程中出现的错误所致。 sgip 协议的错误码描述是非常...
9. **SocketError.h**:错误处理头文件,包含了Socket通信过程中可能出现的错误码和对应的处理机制。 在实际的开发过程中,开发者需要在`Communicate.cpp`中实现Socket的初始化、连接、监听、发送和接收等功能,并...
当尝试绑定一个已经被其他进程使用的端口时,`bind()`函数会返回一个错误码“EADDRINUSE”,即地址已经被使用。这种情况常常出现在以下几种情况: 1. **进程未完全终止**:虽然通过`Ctrl + C`强制结束了进程,但该...
在实际项目中,可能还需要处理异常情况,比如超时、错误码等。同时,为了提高程序的健壮性和可读性,通常会将这些功能封装成类或者函数。通过不断实践和学习,你将能更好地理解和掌握VC_socket编程,构建出强大的...
- 如果创建失败,该函数返回一个资源标识符,可以通过 `socket_strerror` 函数来获取错误信息。 - **绑定 Socket**: - `socket_bind` 函数用于将 socket 绑定到特定地址和端口。如果绑定失败,则同样通过 `...
可以使用`socket_last_error()`和`socket_strerror()`检查错误码和获取错误信息,或者使用`set_error_handler()`自定义错误处理函数。 5. **示例代码** 创建一个简单的PHP Socket Server: ```php $serverSocket...
socket.onerror = function(error) { console.error('An error occurred:', error); }; ``` 在提供的压缩包文件中,我们看到有`OursNET.HTML5.WebSocket.sln`和`oursnet.net.sln`两个解决方案文件,它们可能是包含...
- 如果连接超时,则返回错误;否则返回Socket通道。 #### 四、TCL Socket 实际应用案例 下面是一个更具体的案例,展示了如何实现简单的客户端-服务器通信。 **Server端代码** ```tcl proc accept {chan addr ...
而非阻塞模式下,即使操作未能立即完成,线程也不会被阻塞,而是立即返回一个错误码或特定值。 3. **Connect函数**:用于建立客户端与服务器之间的连接。在客户端程序中,connect函数会尝试与指定的服务器地址建立...
recv会等待发送缓冲中的数据被协议完全发送,如果在此期间出现网络错误,recv会返回`SOCKET_ERROR`。当发送缓冲为空或数据发送完毕,recv会检查接收缓冲区。如果缓冲区无数据或协议正在接收,recv会阻塞等待。一旦...
如果失败,则返回`SOCKET_ERROR`。 - **注意事项**: - 发送数据时,`len`参数应该准确地指定需要发送的数据量。 - 如果发送的数据量大于TCP/IP协议栈允许的最大值(通常是64KB),则需要分多次发送。 - 如果...
为了便于调试和测试,你可能还需要添加错误处理代码,例如检查`WSAGetLastError()`返回的错误码。 本示例虽然简单,但对于初学者来说是一个很好的起点,能够理解Socket编程的基本流程。随着对Socket编程的深入学习...