`
sqiutz
  • 浏览: 69865 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

SOCKET 异常类型

阅读更多

Error code

Meaning

WSAECONNABORTED

The virtual circuit was terminated due to a time-out or other failure.
由于超时或其他错误导致虚电路中止。

WSAECONNRESET

For a stream socket, the virtual circuit was reset by the remote side. The application should close the socket as it is no longer usable. For a UDP datagram socket, this error would indicate that a previous send operation resulted in an ICMP "Port Unreachable" message.
虚电路被远端复位。

WSAEDISCON

Socket s is message oriented and the virtual circuit was gracefully closed by the remote side.
远端优雅的结束了连接。

WSAEFAULT

The lpBuffers parameter is not completely contained in a valid part of the user address space.

WSAEINPROGRESS

A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function.
一个阻塞的WinSock调用正在进行中,或者服务提供者仍在处理一个回调函数

WSAEINTR


The (blocking) call was canceled by the WSACancelBlockingCall function.
通过WSACancelBlockingCall()函数取消(阻塞)调用。

WSAEINVAL

The socket has not been bound (for example, with bind).
套接口未用bind()捆绑,或者套接口未用重叠标志创建。

WSAEMSGSIZE

The message was too large to fit into the specified buffer and (for unreliable protocols only) any trailing portion of the message that did not fit into the buffer has been discarded.

WSAENETDOWN


The network subsystem has failed.
网络子系统失效。

WSAENETRESET

For a connection-oriented socket, this error indicates that the connection has been broken due to keep-alive activity detecting a failure while the operation was in progress. For a datagram socket, this error indicates that the time to live has expired.
由于远端的复位造成连接的中止。

WSAENOTCONN


The socket is not connected.
套接口未连接。

WSAENOTSOCK

The descriptor is not a socket.
描述字不是一个套接口。

WSAEOPNOTSUPP

MSG_OOB was specified, but the socket is not stream-style such as type SOCK_STREAM, OOB data is not supported in the communication domain associated with this socket, or the socket is unidirectional and supports only send operations.
设置了MSG_OOB,但是该套接口不是诸如SOCK_STREAM流类型的,与套接口相关的通讯域不支持带外数据,或者套接口是单向的,只支持发送操作。

WSAESHUTDOWN

The socket has been shut down; it is not possible to call WSARecv on a socket after shutdown has been invoked with howset to SD_RECEIVE or SD_BOTH.
套接口已经关闭;一个套接口以SD_RECEIVE或 SD_BOTH的how参数shutdown()后,无法进行WSARecv()调用。

WSAETIMEDOUT

The connection has been dropped because of a network failure or because the peer system failed to respond.

WSAEWOULDBLOCK

 

Windows NT:  
Overlapped sockets: there are too many outstanding overlapped I/O requests. Nonoverlapped sockets: The socket is marked as nonblocking and the receive operation cannot be completed immediately. 
重叠套接口:太多重叠的输入/输出请求。非重叠套接口:套接口被标志为非阻塞,但是操作不能立即完成。

WSANOTINITIALISED


A successful WSAStartup call must occur before using this function.
在调用本API之前应成功调用WSAStartup()。

WSA_IO_PENDING

An overlapped operation was successfully initiated and completion will be indicated at a later time.
成功启动一个重叠操作,过后将有完成指示。

WSA_OPERATION_ABORTED

The overlapped operation has been canceled due to the closure of the socket.

分享到:
评论

相关推荐

    C#利用Socket实现客户端之间直接通信

     设计程序,分别构建通信的两端:服务器端和客户端应用程序,套接字类型为面向连接的Socket,自己构建双方的应答模式,实现双方的数据的发送和接收(S发给C,C发给S)。 服务端程序能响应单个或任意多个客户端连接...

    socket编程,CS间相互通讯(含实验报告)

    1)设计程序,分别构建通信的两端:服务器端和客户端应用程序,套接字类型为面向连接的Socket,自己构建双方的应答模式,实现双方的数据的发送和接收(S发给C,C发给S)。 2)服务端程序能响应单个或任意多个客户端连接...

    实验1:Socket通信实验

    1)设计程序,分别构建通信的两端:服务器端和客户端应用程序,套接字类型为面向连接的Socket,自己构建双方的应答模式,实现双方的数据的发送和接收(S发给C,C发给S)。 2)服务端程序能响应单个或任意多个客户端...

    Linux-Socket-服务器编程实例.pptx

    Linux Socket服务器端编程实例 #include<netdb.h> Unix和Linux特有的头文件,主要定义了与网络有关的结构、变量类型、宏、函数等。所以在进行Socket网络编程时,必须要包含这个头文件。 5 Linux-Socket-服务器编程...

    java socket通信 一对多

    1)设计程序,分别构建通信的两端:服务器端和客户端应用程序,套接字类型为面向连接的Socket,自己构建双方的应答模式,实现双方的数据的发送和接收(S发给C,C发给S)。 2)服务端程序能响应单个或任意多个客户端...

    socket编程集萃

    事实上网络编程简单的理解就是... 关于这两种输入输出流的不同,我也只知道前一种对字符串支持比较好,后面对于读取一个字符串需要处理,但是可以支持很多种类型的输出。对于传递字符串而言前一种应该是很好的选择了。

    Socket通信实验(多用户)

    1)程序能分别构建通信的两端:服务器端和客户端应用程序,套接字类型为面向连接的Socket,自己构建双方的应答模式,实现双方的数据的发送和接收(S发给C,C发给S)。 2)服务端程序能响应单个或任意多个客户端连接...

    socket通讯实验

    1)设计程序,分别构建通信的两端:服务器端和客户端应用程序,套接字类型为面向连接的Socket,自己构建双方的应答模式,实现双方的数据的发送和接收(S发给C,C发给S)。 2)服务端程序能响应单个或任意多个客户端...

    linux网络编程

    什么是socket IPv4套接口地址结构 网络字节序 字节序转换函数 地址转换函数 套接字类型 07socket编程(二) TCP客户/服务器模型 回射客户/服务器 socket、bind、listen、accept、connect 08socket编程(三) SO_...

    Java网络编程-Socket-文件传输小案例

    //读取一个字节,获得文件头信息,判断发送信息类型(head or body) switch (cmd) { case 0x1: { ///文件信息 if (buflen >= 260) { FileSize = buf.getInt(); //获取文件大小 byte[] filename = new byte[255]; ...

    Java Socket编程笔记_动力节点Java学院整理

    Socket对于我们来说就非常实用了。下面是本次学习的笔记。主要分异常类型、交互原理、Socket、ServerSocket、多线程这几个方面阐述

    网狐6.6 服务器源代码 & 共享组件 & 数据库 (3)

    //SQL 异常类型 enum enSQLException { SQLException_None =0, //没有异常 SQLException_Connect =1, //连接错误 SQLException_Syntax =2, //语法错误 }; //连接状态 enum ...

    2018年C++教程网的linux网络编程视频共41集百度云下载链接.rar

    读、写、异常事件发生条件 用select改进回射服务器程序。 15socket编程(十) 用select改进第八章点对点聊天程序 16socket编程(十一) 套接字I/O超时设置方法 用select实现超时 read_timeout函数封装 write_timeout...

    广工_计算机网络课程设计_端口扫描器的设计与实现_代码和报告.zip

    2.2端口的有效范围是1~65535,在该范围内使用多线程机制循环创建客户端套接字对象,对某一地址(段)的主机端口进行扫描,若套接字没有发生异常,说明该端口打开并提供服务,返回该开放端口的类型(如UDP端口还是TCP...

    提供TCP网络服务的C/S的通讯构架基础类(异步通信)

    /// 程序或者程序异常退出等,没有执行正常的退出方法而产生的. /// * 正常的退出类型是应用程序执行正常的退出的方法关键在于 /// 需要调用Socket.Shutdown( SocketShutdown.Both )后才调用 /// Socket.Close()方法,...

    Java网络编程(第三版)中文版.part11.rar

    Socket异常 312 Socket地址 313 示例 314 第十章 服务器socket 332 ServerSocket类 332 一些有用的服务器 349 第十一章 安全Socket 370 保护通信 371 创建安全客户端Socket 374 SSLSocket类的方法 378 ...

    Java网络编程(第三版)高清中文版.part01.rar

    Socket异常 312 Socket地址 313 示例 314 第十章 服务器socket 332 ServerSocket类 332 一些有用的服务器 349 第十一章 安全Socket 370 保护通信 371 创建安全客户端Socket 374 SSLSocket类的方法 378 ...

    Java网络编程(第三版)中文版.part06.rar

    Socket异常 312 Socket地址 313 示例 314 第十章 服务器socket 332 ServerSocket类 332 一些有用的服务器 349 第十一章 安全Socket 370 保护通信 371 创建安全客户端Socket 374 SSLSocket类的方法 378 ...

    Java网络编程(第三版)中文版.part07.rar

    Socket异常 312 Socket地址 313 示例 314 第十章 服务器socket 332 ServerSocket类 332 一些有用的服务器 349 第十一章 安全Socket 370 保护通信 371 创建安全客户端Socket 374 SSLSocket类的方法 378 ...

Global site tag (gtag.js) - Google Analytics