mscorlib(4.0.0.0) API with additions
|
Classes | |
struct | IPPacketInformation |
Presents the packet information from a call to M:System.Net.Sockets.Socket.ReceiveMessageFrom(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@) or M:System.Net.Sockets.Socket.EndReceiveMessageFrom(System.IAsyncResult,System.Net.Sockets.SocketFlags@,System.Net.EndPoint@,System.Net.Sockets.IPPacketInformation@). More... | |
class | IPv6MulticastOption |
Contains option values for joining an IPv6 multicast group. More... | |
class | LingerOption |
Specifies whether a T:System.Net.Sockets.Socket will remain connected after a call to the M:System.Net.Sockets.Socket.Close or M:System.Net.Sockets.TcpClient.Close methods and the length of time it will remain connected, if data remains to be sent. More... | |
class | MulticastOption |
Contains T:System.Net.IPAddress values used to join and drop multicast groups. More... | |
class | NetworkStream |
Provides the underlying stream of data for network access. More... | |
class | SendPacketsElement |
Represents an element in a T:System.Net.Sockets.SendPacketsElement array. More... | |
class | Socket |
Implements the Berkeley sockets interface. More... | |
class | SocketAsyncEventArgs |
Represents an asynchronous socket operation. More... | |
class | SocketException |
The exception that is thrown when a socket error occurs. More... | |
struct | SocketInformation |
Encapsulates the information that is necessary to duplicate a T:System.Net.Sockets.Socket. More... | |
struct | SocketReceiveFromResult |
The result of a M:System.Net.Sockets.SocketTaskExtensions.ReceiveFromAsync(System.Net.Sockets.Socket,System.ArraySegment<System.Byte>,System.Net.Sockets.SocketFlags,System.Net.EndPoint) operation. More... | |
struct | SocketReceiveMessageFromResult |
The result of a M:System.Net.Sockets.SocketTaskExtensions.ReceiveMessageFromAsync(System.Net.Sockets.Socket,System.ArraySegment<System.Byte>,System.Net.Sockets.SocketFlags,System.Net.EndPoint) operation. More... | |
class | SocketTaskExtensions |
This class contains extension methods to the T:System.Net.Sockets.Socket class. More... | |
class | TcpClient |
Provides client connections for TCP network services. More... | |
class | TcpListener |
Listens for connections from TCP network clients. More... | |
class | UdpClient |
Provides User Datagram Protocol (UDP) network services. More... | |
struct | UdpReceiveResult |
Presents UDP receive result information from a call to the M:System.Net.Sockets.UdpClient.ReceiveAsync method. More... | |
Functions | |
internal delegate bool | AcceptExDelegate (SafeCloseSocket listenSocketHandle, SafeCloseSocket acceptSocketHandle, IntPtr buffer, int len, int localAddressLength, int remoteAddressLength, out int bytesReceived, SafeHandle overlapped) |
internal delegate bool | ConnectExDelegate (SafeCloseSocket socketHandle, IntPtr socketAddress, int socketAddressSize, IntPtr buffer, int dataLength, out int bytesSent, SafeHandle overlapped) |
internal delegate bool | DisconnectExDelegate (SafeCloseSocket socketHandle, SafeHandle overlapped, int flags, int reserved) |
internal delegate bool | DisconnectExDelegate_Blocking (IntPtr socketHandle, IntPtr overlapped, int flags, int reserved) |
internal delegate void | GetAcceptExSockaddrsDelegate (IntPtr buffer, int receiveDataLength, int localAddressLength, int remoteAddressLength, out IntPtr localSocketAddress, out int localSocketAddressLength, out IntPtr remoteSocketAddress, out int remoteSocketAddressLength) |
internal delegate bool | TransmitPacketsDelegate (SafeCloseSocket socketHandle, IntPtr packetArray, int elementCount, int sendSize, SafeNativeOverlapped overlapped, TransmitFileOptions flags) |
internal delegate SocketError | WSARecvMsgDelegate (SafeCloseSocket socketHandle, IntPtr msg, out int bytesTransferred, SafeHandle overlapped, IntPtr completionRoutine) |
internal delegate SocketError | WSARecvMsgDelegate_Blocking (IntPtr socketHandle, IntPtr msg, out int bytesTransferred, IntPtr overlapped, IntPtr completionRoutine) |
|
strong |
Specifies the addressing scheme that an instance of the T:System.Net.Sockets.Socket class can use.
Definition at line 5 of file AddressFamily.cs.
|
strong |
Specifies the IO control codes supported by the M:System.Net.Sockets.Socket.IOControl(System.Int32,System.Byte[],System.Byte[]) method.
Enumerator | |
---|---|
AsyncIO | Enable notification for when data is waiting to be received. This value is equal to the Winsock 2 FIOASYNC constant. |
NonBlockingIO | Control the blocking behavior of the socket. If the argument specified with this control code is zero, the socket is placed in blocking mode. If the argument is nonzero, the socket is placed in nonblocking mode. This value is equal to the Winsock 2 FIONBIO constant. |
DataToRead | Return the number of bytes available for reading. This value is equal to the Winsock 2 FIONREAD constant. |
OobDataRead | Return information about out-of-band data waiting to be received. When using this control code on stream sockets, the return value indicates the number of bytes available. |
AssociateHandle | Associate this socket with the specified handle of a companion interface. Refer to the appropriate protocol-specific annex in the Winsock 2 reference or documentation for the particular companion interface for additional details. It is recommended that the Component Object Model (COM) be used instead of this IOCTL to discover and track other interfaces that might be supported by a socket. This control code is present for backward compatibility with systems where COM is not available or cannot be used for some other reason. This value is equal to the Winsock 2 SIO_ASSOCIATE_HANDLE constant. |
EnableCircularQueuing | Replace the oldest queued datagram with an incoming datagram when the incoming message queues are full. This value is equal to the Winsock 2 SIO_ENABLE_CIRCULAR_QUEUEING constant. |
Flush | Discard the contents of the sending queue. This value is equal to the Winsock 2 SIO_FLUSH constant. |
GetBroadcastAddress | Return a SOCKADDR structure that contains the broadcast address for the address family of the current socket. The returned address can be used with the Overload:System.Net.Sockets.Socket.SendTo method. This value is equal to the Winsock 2 SIO_GET_BROADCAST_ADDRESS constant. This value can be used on User Datagram Protocol (UDP) sockets only. |
GetExtensionFunctionPointer | Obtain provider-specific functions that are not part of the Winsock specification. Functions are specified using their provider-assigned GUID. This value is equal to the Winsock 2 SIO_GET_EXTENSION_FUNCTION_POINTER constant. |
GetQos | Retrieve the QOS structure associated with the socket. This control is only supported on platforms that provide a QOS capable transport (Windows Me, Windows 2000, and later.) This value is equal to the Winsock 2 SIO_GET_QOS constant. |
GetGroupQos | Return the Quality of Service (QOS) attributes for the socket group. This value is reserved for future use, and is equal to the Winsock 2 SIO_GET_GROUP_QOS constant. |
MultipointLoopback | Control whether multicast data sent by the socket appears as incoming data in the sockets receive queue. This value is equal to the Winsock 2 SIO_MULTIPOINT_LOOPBACK constant. |
MulticastScope | Control the number of times a multicast packet can be forwarded by a router, also known as the Time to Live (TTL), or hop count. This value is equal to the Winsock 2 SIO_MULTICAST_SCOPE constant. |
SetQos | Set the Quality of Service (QOS) attributes for the socket. QOS defines the bandwidth requirements for the socket. This control code is supported on Windows Me, Windows 2000, and later operating systems. This value is equal to the Winsock 2 SIO_SET_QOS constant. |
SetGroupQos | Set the Quality of Service (QOS) attributes for the socket group. This value is reserved for future use and is equal to the Winsock 2 SIO_SET_GROUP_QOS constant. |
TranslateHandle | Return a handle for the socket that is valid in the context of a companion interface. This value is equal to the Winsock 2 SIO_TRANSLATE_HANDLE constant. |
RoutingInterfaceQuery | Return the interface addresses that can be used to connect to the specified remote address. This value is equal to the Winsock 2 SIO_ROUTING_INTERFACE_QUERY constant. |
RoutingInterfaceChange | Enable receiving notification when the local interface used to access a remote endpoint changes. This value is equal to the Winsock 2 SIO_ROUTING_INTERFACE_CHANGE constant. |
AddressListQuery | Return the list of local interfaces that the socket can bind to. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_ADDRESS_LIST_QUERY constant. |
AddressListChange | Enable receiving notification when the list of local interfaces for the socket's protocol family changes. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_ADDRESS_LIST_CHANGE constant. |
QueryTargetPnpHandle | Retrieve the underlying provider's SOCKET handle. This handle can be used to receive plug-and-play event notification. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_QUERY_TARGET_PNP_HANDLE constant. |
NamespaceChange | Control whether the socket receives notification when a namespace query becomes invalid. This control code is supported on Windows XP and later operating systems. This value is equal to the Winsock 2 SIO_NSP_NOTIFY_CHANGE constant. |
AddressListSort | Sort the structure returned by the F:System.Net.Sockets.IOControlCode.AddressListQuery field and add scope ID information for IPv6 addresses. This control code is supported on Windows XP and later operating systems. This value is equal to the Winsock 2 SIO_ADDRESS_LIST_SORT constant. |
ReceiveAll | Enable receiving all IPv4 packets on the network. The socket must have address family F:System.Net.Sockets.AddressFamily.InterNetwork, the socket type must be F:System.Net.Sockets.SocketType.Raw, and the protocol type must be F:System.Net.Sockets.ProtocolType.IP. The current user must belong to the Administrators group on the local computer, and the socket must be bound to a specific port. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_RCVALL constant. |
ReceiveAllMulticast | Enable receiving all multicast IPv4 packets on the network. These are packets with destination addresses in the range 224.0.0.0 through 239.255.255.255. The socket must have address family F:System.Net.Sockets.AddressFamily.InterNetwork, the socket type must be F:System.Net.Sockets.SocketType.Raw, and the protocol type must be F:System.Net.Sockets.ProtocolType.Udp. The current user must belong to the Administrators group on the local computer, and the socket must be bound to a specific port. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_RCVALL_MCAST constant. |
ReceiveAllIgmpMulticast | Enable receiving all Internet Group Management Protocol (IGMP) packets on the network. The socket must have address family F:System.Net.Sockets.AddressFamily.InterNetwork, the socket type must be F:System.Net.Sockets.SocketType.Raw, and the protocol type must be F:System.Net.Sockets.ProtocolType.Igmp. The current user must belong to the Administrators group on the local computer, and the socket must be bound to a specific port. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_RCVALL_IGMPMCAST constant. |
KeepAliveValues | Control sending TCP keep-alive packets and the interval at which they are sent. This control code is supported on Windows 2000 and later operating systems. For additional information, see RFC 1122 section 4.2.3.6. This value is equal to the Winsock 2 SIO_KEEPALIVE_VALS constant. |
AbsorbRouterAlert | This value is equal to the Winsock 2 SIO_ABSORB_RTRALERT constant. |
UnicastInterface | Set the interface used for outgoing unicast packets. This value is equal to the Winsock 2 SIO_UCAST_IF constant. |
LimitBroadcasts | This value is equal to the Winsock 2 SIO_LIMIT_BROADCASTS constant. |
BindToInterface | Bind the socket to a specified interface index. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_INDEX_BIND constant. |
MulticastInterface | Set the interface used for outgoing multicast packets. The interface is identified by its index. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_INDEX_MCASTIF constant. |
AddMulticastGroupOnInterface | Join a multicast group using an interface identified by its index. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_INDEX_ADD_MCAST constant. |
DeleteMulticastGroupFromInterface | Remove the socket from a multicast group. This control code is supported on Windows 2000 and later operating systems. This value is equal to the Winsock 2 SIO_INDEX_ADD_MCAST constant. |
Definition at line 4 of file IOControlCode.cs.
|
strong |
A value that enables restriction of an IPv6 socket to a specified scope, such as addresses with the same link local or site local prefix.
Definition at line 4 of file IPProtectionLevel.cs.
|
strong |
Specifies the type of protocol that an instance of the T:System.Net.Sockets.Socket class can use.
Definition at line 4 of file ProtocolFamily.cs.
|
strong |
Specifies the protocols that the T:System.Net.Sockets.Socket class supports.
Enumerator | |
---|---|
IP | Internet Protocol. |
IPv6HopByHopOptions | IPv6 Hop by Hop Options header. |
Icmp | Internet Control Message Protocol. |
Igmp | Internet Group Management Protocol. |
Ggp | Gateway To Gateway Protocol. |
IPv4 | Internet Protocol version 4. |
Tcp | Transmission Control Protocol. |
Pup | PARC Universal Packet Protocol. |
Udp | User Datagram Protocol. |
Idp | Internet Datagram Protocol. |
IPv6 | Internet Protocol version 6 (IPv6). |
IPv6RoutingHeader | IPv6 Routing header. |
IPv6FragmentHeader | IPv6 Fragment header. |
IPSecEncapsulatingSecurityPayload | IPv6 Encapsulating Security Payload header. |
IPSecAuthenticationHeader | IPv6 Authentication header. For details, see RFC 2292 section 2.2.1, available at http://www.ietf.org. |
IcmpV6 | Internet Control Message Protocol for IPv6. |
IPv6NoNextHeader | IPv6 No next header. |
IPv6DestinationOptions | IPv6 Destination Options header. |
ND | Net Disk Protocol (unofficial). |
Raw | Raw IP packet protocol. |
Unspecified | Unspecified protocol. |
Ipx | Internet Packet Exchange Protocol. |
Spx | Sequenced Packet Exchange protocol. |
SpxII | Sequenced Packet Exchange version 2 protocol. |
Unknown | Unknown protocol. |
Definition at line 4 of file ProtocolType.cs.
|
strong |
Defines the polling modes for the M:System.Net.Sockets.Socket.Poll(System.Int32,System.Net.Sockets.SelectMode) method.
Enumerator | |
---|---|
SelectRead | Read status mode. |
SelectWrite | Write status mode. |
SelectError | Error status mode. |
Definition at line 4 of file SelectMode.cs.
|
strong |
The type of asynchronous socket operation most recently performed with this context object.
Definition at line 4 of file SocketAsyncOperation.cs.
Specifies the method to download a client access policy file.
Enumerator | |
---|---|
Tcp | The socket policy file is downloaded using a custom TCP protocol running on TCP port 943. |
Http | The socket policy file is downloaded using the HTTP protocol running on TCP port 943. |
Definition at line 8 of file SocketClientAccessPolicyProtocol.cs.
|
strong |
Defines error codes for the T:System.Net.Sockets.Socket class.
Definition at line 5 of file SocketError.cs.
|
strong |
Specifies socket send and receive behaviors.
Definition at line 5 of file SocketFlags.cs.
|
strong |
Describes states for a T:System.Net.Sockets.Socket.
Definition at line 5 of file SocketInformationOptions.cs.
|
strong |
Defines socket option levels for the M:System.Net.Sockets.Socket.SetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName,System.Int32) and M:System.Net.Sockets.Socket.GetSocketOption(System.Net.Sockets.SocketOptionLevel,System.Net.Sockets.SocketOptionName) methods.
Definition at line 4 of file SocketOptionLevel.cs.
|
strong |
Defines configuration option names.
Enumerator | |
---|---|
Debug | Record debugging information. |
AcceptConnection | The socket is listening. |
ReuseAddress | Allows the socket to be bound to an address that is already in use. |
KeepAlive | Use keep-alives. |
DontRoute | Do not route; send the packet directly to the interface addresses. |
Broadcast | Permit sending broadcast messages on the socket. |
UseLoopback | Bypass hardware when possible. |
Linger | Linger on close if unsent data is present. |
OutOfBandInline | Receives out-of-band data in the normal data stream. |
DontLinger | Close the socket gracefully without lingering. |
ExclusiveAddressUse | Enables a socket to be bound for exclusive access. |
SendBuffer | Specifies the total per-socket buffer space reserved for sends. This is unrelated to the maximum message size or the size of a TCP window. |
ReceiveBuffer | Specifies the total per-socket buffer space reserved for receives. This is unrelated to the maximum message size or the size of a TCP window. |
SendLowWater | Specifies the low water mark for Overload:System.Net.Sockets.Socket.Send operations. |
ReceiveLowWater | Specifies the low water mark for Overload:System.Net.Sockets.Socket.Receive operations. |
SendTimeout | Send a time-out. This option applies only to synchronous methods; it has no effect on asynchronous methods such as the M:System.Net.Sockets.Socket.BeginSend(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags,System.AsyncCallback,System.Object) method. |
ReceiveTimeout | Receive a time-out. This option applies only to synchronous methods; it has no effect on asynchronous methods such as the M:System.Net.Sockets.Socket.BeginSend(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags,System.AsyncCallback,System.Object) method. |
Error | Get the error status and clear. |
Type | Get the socket type. |
ReuseUnicastPort | Indicates that the system should defer ephemeral port allocation for outbound connections. This is equivalent to using the Winsock2 SO_REUSE_UNICASTPORT socket option. |
MaxConnections | Not supported; will throw a T:System.Net.Sockets.SocketException if used. |
IPOptions | Specifies the IP options to be inserted into outgoing datagrams. |
HeaderIncluded | Indicates that the application provides the IP header for outgoing datagrams. |
TypeOfService | Change the IP header type of the service field. |
IpTimeToLive | Set the IP header Time-to-Live field. |
MulticastInterface | Set the interface for outgoing multicast packets. |
MulticastTimeToLive | An IP multicast Time to Live. |
MulticastLoopback | An IP multicast loopback. |
AddMembership | Add an IP group membership. |
DropMembership | Drop an IP group membership. |
DontFragment | Do not fragment IP datagrams. |
AddSourceMembership | Join a source group. |
DropSourceMembership | Drop a source group. |
BlockSource | Block data from a source. |
UnblockSource | Unblock a previously blocked source. |
PacketInformation | Return information about received packets. |
HopLimit | Specifies the maximum number of router hops for an Internet Protocol version 6 (IPv6) packet. This is similar to Time to Live (TTL) for Internet Protocol version 4. |
IPProtectionLevel | Enables restriction of a IPv6 socket to a specified scope, such as addresses with the same link local or site local prefix.This socket option enables applications to place access restrictions on IPv6 sockets. Such restrictions enable an application running on a private LAN to simply and robustly harden itself against external attacks. This socket option widens or narrows the scope of a listening socket, enabling unrestricted access from public and private users when appropriate, or restricting access only to the same site, as required. This socket option has defined protection levels specified in the T:System.Net.Sockets.IPProtectionLevel enumeration. |
IPv6Only | Indicates if a socket created for the AF_INET6 address family is restricted to IPv6 communications only. Sockets created for the AF_INET6 address family may be used for both IPv6 and IPv4 communications. Some applications may want to restrict their use of a socket created for the AF_INET6 address family to IPv6 communications only. When this value is non-zero (the default on Windows), a socket created for the AF_INET6 address family can be used to send and receive IPv6 packets only. When this value is zero, a socket created for the AF_INET6 address family can be used to send and receive packets to and from an IPv6 address or an IPv4 address. Note that the ability to interact with an IPv4 address requires the use of IPv4 mapped addresses. This socket option is supported on Windows Vista or later. |
NoDelay | Disables the Nagle algorithm for send coalescing. |
BsdUrgent | Use urgent data as defined in RFC-1222. This option can be set only once; after it is set, it cannot be turned off. |
Expedited | Use expedited data as defined in RFC-1222. This option can be set only once; after it is set, it cannot be turned off. |
NoChecksum | Send UDP datagrams with checksum set to zero. |
ChecksumCoverage | Set or get the UDP checksum coverage. |
UpdateAcceptContext | Updates an accepted socket's properties by using those of an existing socket. This is equivalent to using the Winsock2 SO_UPDATE_ACCEPT_CONTEXT socket option and is supported only on connection-oriented sockets. |
UpdateConnectContext | Updates a connected socket's properties by using those of an existing socket. This is equivalent to using the Winsock2 SO_UPDATE_CONNECT_CONTEXT socket option and is supported only on connection-oriented sockets. |
Definition at line 4 of file SocketOptionName.cs.
|
strong |
Defines constants that are used by the M:System.Net.Sockets.Socket.Shutdown(System.Net.Sockets.SocketShutdown) method.
Definition at line 4 of file SocketShutdown.cs.
|
strong |
Specifies the type of socket that an instance of the T:System.Net.Sockets.Socket class represents.
Enumerator | |
---|---|
Stream | Supports reliable, two-way, connection-based byte streams without the duplication of data and without preservation of boundaries. A |
Dgram | Supports datagrams, which are connectionless, unreliable messages of a fixed (typically small) maximum length. Messages might be lost or duplicated and might arrive out of order. A T:System.Net.Sockets.Socket of type F:System.Net.Sockets.SocketType.Dgram requires no connection prior to sending and receiving data, and can communicate with multiple peers. F:System.Net.Sockets.SocketType.Dgram uses the Datagram Protocol (F:System.Net.Sockets.ProtocolType.Udp) and the F:System.Net.Sockets.AddressFamily.InterNetworkT:System.Net.Sockets.AddressFamily. |
Raw | Supports access to the underlying transport protocol. Using the T:System.Net.Sockets.SocketTypeF:System.Net.Sockets.SocketType.Raw, you can communicate using protocols like Internet Control Message Protocol (F:System.Net.Sockets.ProtocolType.Icmp) and Internet Group Management Protocol (F:System.Net.Sockets.ProtocolType.Igmp). Your application must provide a complete IP header when sending. Received datagrams return with the IP header and options intact. |
Rdm | Supports connectionless, message-oriented, reliably delivered messages, and preserves message boundaries in data. Rdm (Reliably Delivered Messages) messages arrive unduplicated and in order. Furthermore, the sender is notified if messages are lost. If you initialize a |
Seqpacket | Provides connection-oriented and reliable two-way transfer of ordered byte streams across a network. F:System.Net.Sockets.SocketType.Seqpacket does not duplicate data, and it preserves boundaries within the data stream. A |
Unknown | Specifies an unknown |
Definition at line 4 of file SocketType.cs.
|
strong |
The T:System.Net.Sockets.TransmitFileOptions enumeration defines values used in file transfer requests.
Definition at line 5 of file TransmitFileOptions.cs.