System.Net.Sockets Specifies the protocols that the class supports. Transmission Control Protocol. User Datagram Protocol. Unknown protocol. Unspecified protocol. Implements the Berkeley sockets interface. Initializes a new instance of the class using the specified address family, socket type and protocol. One of the values. One of the values. One of the values. The combination of , , and results in an invalid socket. Initializes a new instance of the class using the specified socket type and protocol. One of the values. One of the values. The combination of and results in an invalid socket. Begins an asynchronous operation to accept an incoming connection attempt. Returns true if the I/O operation is pending. The event on the parameter will be raised upon completion of the operation.Returns false if the I/O operation completed synchronously. The event on the parameter will not be raised and the object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation. The object to use for this asynchronous socket operation. An argument is not valid. This exception occurs if the buffer provided is not large enough. The buffer must be at least 2 * (sizeof(SOCKADDR_STORAGE + 16) bytes. This exception also occurs if multiple buffers are specified, the property is not null. An argument is out of range. The exception occurs if the is less than 0. An invalid operation was requested. This exception occurs if the accepting is not listening for connections or the accepted socket is bound. You must call the and method before calling the method.This exception also occurs if the socket is already connected or a socket operation was already in progress using the specified parameter. An error occurred when attempting to access the socket. See the Remarks section for more information. Windows XP or later is required for this method. The has been closed. Gets the address family of the . One of the values. Associates a with a local endpoint. The local to associate with the . is null. An error occurred when attempting to access the socket. See the Remarks section for more information. The has been closed. A caller higher in the call stack does not have permission for the requested operation. Cancels an asynchronous request for a remote host connection. The object used to request the connection to the remote host by calling one of the methods. The parameter cannot be null and the cannot be null. An error occurred when attempting to access the socket. The has been closed. A caller higher in the call stack does not have permission for the requested operation. Begins an asynchronous request for a connection to a remote host. Returns true if the I/O operation is pending. The event on the parameter will be raised upon completion of the operation. Returns false if the I/O operation completed synchronously. In this case, The event on the parameter will not be raised and the object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation. The object to use for this asynchronous socket operation. An argument is not valid. This exception occurs if multiple buffers are specified, the property is not null. The parameter cannot be null and the cannot be null. The is listening or a socket operation was already in progress using the object specified in the parameter. An error occurred when attempting to access the socket. See the Remarks section for more information. Windows XP or later is required for this method. This exception also occurs if the local endpoint and the are not the same address family. The has been closed. A caller higher in the call stack does not have permission for the requested operation. Begins an asynchronous request for a connection to a remote host. Returns true if the I/O operation is pending. The event on the parameter will be raised upon completion of the operation. Returns false if the I/O operation completed synchronously. In this case, The event on the parameter will not be raised and the object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation. One of the values. One of the values. The object to use for this asynchronous socket operation. An argument is not valid. This exception occurs if multiple buffers are specified, the property is not null. The parameter cannot be null and the cannot be null. The is listening or a socket operation was already in progress using the object specified in the parameter. An error occurred when attempting to access the socket. See the Remarks section for more information. Windows XP or later is required for this method. This exception also occurs if the local endpoint and the are not the same address family. The has been closed. A caller higher in the call stack does not have permission for the requested operation. Gets a value that indicates whether a is connected to a remote host as of the last or operation. true if the was connected to a remote resource as of the most recent operation; otherwise, false. Releases all resources used by the current instance of the class. Releases the unmanaged resources used by the , and optionally disposes of the managed resources. true to release both managed and unmanaged resources; false to releases only unmanaged resources. Frees resources used by the class. Places a in a listening state. The maximum length of the pending connections queue. An error occurred when attempting to access the socket. See the Remarks section for more information. The has been closed. Gets the local endpoint. The that the is using for communications. An error occurred when attempting to access the socket. See the Remarks section for more information. The has been closed. Gets or sets a value that specifies whether the stream is using the Nagle algorithm. false if the uses the Nagle algorithm; otherwise, true. The default is false. An error occurred when attempting to access the . See the Remarks section for more information. The has been closed. Indicates whether the underlying operating system and network adaptors support Internet Protocol version 4 (IPv4). true if the operating system and network adaptors support the IPv4 protocol; otherwise, false. Indicates whether the underlying operating system and network adaptors support Internet Protocol version 6 (IPv6). true if the operating system and network adaptors support the IPv6 protocol; otherwise, false. Gets the protocol type of the . One of the values. Begins an asynchronous request to receive data from a connected object. Returns true if the I/O operation is pending. The event on the parameter will be raised upon completion of the operation. Returns false if the I/O operation completed synchronously. In this case, The event on the parameter will not be raised and the object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation. The object to use for this asynchronous socket operation. An argument was invalid. The or properties on the parameter must reference valid buffers. One or the other of these properties may be set, but not both at the same time. A socket operation was already in progress using the object specified in the parameter. Windows XP or later is required for this method. The has been closed. An error occurred when attempting to access the socket. See the Remarks section for more information. Gets or sets a value that specifies the size of the receive buffer of the . An that contains the size, in bytes, of the receive buffer. The default is 8192. An error occurred when attempting to access the socket. The has been closed. The value specified for a set operation is less than 0. Begins to asynchronously receive data from a specified network device. Returns true if the I/O operation is pending. The event on the parameter will be raised upon completion of the operation. Returns false if the I/O operation completed synchronously. In this case, The event on the parameter will not be raised and the object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation. The object to use for this asynchronous socket operation. The cannot be null. A socket operation was already in progress using the object specified in the parameter. Windows XP or later is required for this method. The has been closed. An error occurred when attempting to access the socket. Gets the remote endpoint. The with which the is communicating. An error occurred when attempting to access the socket. See the Remarks section for more information. The has been closed. Sends data asynchronously to a connected object. Returns true if the I/O operation is pending. The event on the parameter will be raised upon completion of the operation. Returns false if the I/O operation completed synchronously. In this case, The event on the parameter will not be raised and the object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation. The object to use for this asynchronous socket operation. The or properties on the parameter must reference valid buffers. One or the other of these properties may be set, but not both at the same time. A socket operation was already in progress using the object specified in the parameter. Windows XP or later is required for this method. The has been closed. The is not yet connected or was not obtained via an , ,or , method. Gets or sets a value that specifies the size of the send buffer of the . An that contains the size, in bytes, of the send buffer. The default is 8192. An error occurred when attempting to access the socket. The has been closed. The value specified for a set operation is less than 0. Sends data asynchronously to a specific remote host. Returns true if the I/O operation is pending. The event on the parameter will be raised upon completion of the operation. Returns false if the I/O operation completed synchronously. In this case, The event on the parameter will not be raised and the object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation. The object to use for this asynchronous socket operation. The cannot be null. A socket operation was already in progress using the object specified in the parameter. Windows XP or later is required for this method. The has been closed. The protocol specified is connection-oriented, but the is not yet connected. Disables sends and receives on a . One of the values that specifies the operation that will no longer be allowed. An error occurred when attempting to access the socket. See the Remarks section for more information. The has been closed. Gets or sets a value that specifies the Time To Live (TTL) value of Internet Protocol (IP) packets sent by the . The TTL value. The TTL value can't be set to a negative number. This property can be set only for sockets in the or families. An error occurred when attempting to access the socket. This error is also returned when an attempt was made to set TTL to a value higher than 255. The has been closed. Represents an asynchronous socket operation. Creates an empty instance. The platform is not supported. Gets or sets the socket to use or the socket created for accepting a connection with an asynchronous socket method. The to use or the socket created for accepting a connection with an asynchronous socket method. Gets the data buffer to use with an asynchronous socket method. A array that represents the data buffer to use with an asynchronous socket method. Gets or sets an array of data buffers to use with an asynchronous socket method. An that represents an array of data buffers to use with an asynchronous socket method. There are ambiguous buffers specified on a set operation. This exception occurs if the property has been set to a non-null value and an attempt was made to set the property to a non-null value. Gets the number of bytes transferred in the socket operation. An that contains the number of bytes transferred in the socket operation. The event used to complete an asynchronous operation. Gets the exception in the case of a connection failure when a was used. An that indicates the cause of the connection error when a was specified for the property. The created and connected object after successful completion of the method. The connected object. Gets the maximum amount of data, in bytes, to send or receive in an asynchronous operation. An that contains the maximum amount of data, in bytes, to send or receive. Releases the unmanaged resources used by the instance and optionally disposes of the managed resources. Frees resources used by the class. Gets the type of socket operation most recently performed with this context object. A instance that indicates the type of socket operation most recently performed with this context object. Gets the offset, in bytes, into the data buffer referenced by the property. An that contains the offset, in bytes, into the data buffer referenced by the property. Represents a method that is called when an asynchronous operation completes. The event that is signaled. Gets or sets the remote IP endpoint for an asynchronous operation. An that represents the remote IP endpoint for an asynchronous operation. Sets the data buffer to use with an asynchronous socket method. The data buffer to use with an asynchronous socket method. The offset, in bytes, in the data buffer where the operation starts. The maximum amount of data, in bytes, to send or receive in the buffer. There are ambiguous buffers specified. This exception occurs if the property is also not null and the property is also not null. An argument was out of range. This exception occurs if the parameter is less than zero or greater than the length of the array in the property. This exception also occurs if the parameter is less than zero or greater than the length of the array in the property minus the parameter. Sets the data buffer to use with an asynchronous socket method. The offset, in bytes, in the data buffer where the operation starts. The maximum amount of data, in bytes, to send or receive in the buffer. An argument was out of range. This exception occurs if the parameter is less than zero or greater than the length of the array in the property. This exception also occurs if the parameter is less than zero or greater than the length of the array in the property minus the parameter. Gets or sets the result of the asynchronous socket operation. A that represents the result of the asynchronous socket operation. Gets or sets a user or application object associated with this asynchronous socket operation. An object that represents the user or application object associated with this asynchronous socket operation. The type of asynchronous socket operation most recently performed with this context object. A socket Accept operation. A socket Connect operation. None of the socket operations. A socket Receive operation. A socket ReceiveFrom operation. A socket Send operation. A socket SendTo operation. Defines constants that are used by the method. Disables a for both sending and receiving. This field is constant. Disables a for receiving. This field is constant. Disables a for sending. This field is constant. Specifies the type of socket that an instance of the class represents. 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 of type requires no connection prior to sending and receiving data, and can communicate with multiple peers. uses the Datagram Protocol () and the . Supports reliable, two-way, connection-based byte streams without the duplication of data and without preservation of boundaries. A Socket of this type communicates with a single peer and requires a remote host connection before communication can begin. uses the Transmission Control Protocol () and the InterNetwork. Specifies an unknown Socket type.