This topic has not yet been rated - Rate this topic

Socket Methods

April 12, 2014

The Socket type exposes the following members.

  NameDescription
Public method AcceptAsync Begins an asynchronous operation to accept an incoming connection attempt.
Public method Bind Associates a socket with a specific local endpoint. You do not need to call Bind before using the ConnectAsync method unless you need to use a specific local endpoint.
Public method Static member CancelConnectAsync Cancels an outstanding asynchronous socket operation for a remote host connection.
Public method Close() Closes the Socket connection and releases all associated resources.
Public method Close(Int32) Closes the Socket connection and releases all associated resources with a specified timeout to allow queued data to be sent.
Public method ConnectAsync(SocketAsyncEventArgs) Begins an asynchronous request for a remote host connection.
Public method Static member ConnectAsync(SocketType, ProtocolType, SocketAsyncEventArgs) Begins an asynchronous request for a remote host connection.
Public method Dispose() Releases the unmanaged resources used by the Socket, and optionally disposes of the managed resources.
Protected method Dispose(Boolean) Releases the unmanaged resources used by the Socket, and optionally disposes of the managed resources.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Frees resources used by the Socket class. (Overrides Object.Finalize().)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Listen Listens for incoming connection attempts.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ReceiveAsync Begins an asynchronous request to receive data from a connected Socket object.
Public method ReceiveFromAsync Begins an asynchronous request to receive data from a specific remote host.
Public method SendAsync Sends data asynchronously to a connected Socket object.
Public method SendToAsync Sends data asynchronously to a specific remote host.
Public method Shutdown Disables sends and receives on a Socket.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top
  NameDescription
Public Extension Method AssociateToNetworkInterface Sets information about a network interface by associating it with a new set of network interface information. (Defined by SocketExtensions.)
Public Extension Method GetCurrentNetworkInterface Gets all available information about the network interface. (Defined by SocketExtensions.)
Public Extension Method SetNetworkPreference Sets the preference for a network interface to use either cellular or non-cellular technology. (Defined by SocketExtensions.)
Public Extension Method SetNetworkRequirement Sets the requirement for a network interface to use either cellular or non-cellular technology. (Defined by SocketExtensions.)
Top

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.