This documentation is archived and is not being maintained.

Socket Methods

The methods of the Socket class are listed here. For a complete list of Socket class members, see the Socket Members topic.

Public Methods

public methodAccept

Supported by the .NET Compact Framework.

Creates a new Socket for a newly created connection.
public methodBeginAccept

Supported by the .NET Compact Framework.

Begins an asynchronous operation to accept an incoming connection attempt.
public methodBeginConnect

Supported by the .NET Compact Framework.

Begins an asynchronous request for a remote host connection.
public methodBeginReceive

Supported by the .NET Compact Framework.

Begins to asynchronously receive data from a connected Socket.
public methodBeginReceiveFrom

Supported by the .NET Compact Framework.

Begins to asynchronously receive data from a specified network device.
public methodBeginSend

Supported by the .NET Compact Framework.

Sends data asynchronously to a connected Socket.
public methodBeginSendTo

Supported by the .NET Compact Framework.

Sends data asynchronously to a specific remote host.
public methodBind

Supported by the .NET Compact Framework.

Associates a Socket with a local endpoint.
public methodClose

Supported by the .NET Compact Framework.

Closes the Socket connection and releases all associated resources.
public methodConnect

Supported by the .NET Compact Framework.

Establishes a connection to a remote host.
public methodEndAccept

Supported by the .NET Compact Framework.

Asynchronously accepts an incoming connection attempt and creates a new Socket to handle remote host communication.
public methodEndConnect

Supported by the .NET Compact Framework.

Ends a pending asynchronous connection request.
public methodEndReceive

Supported by the .NET Compact Framework.

Ends a pending asynchronous read.
public methodEndReceiveFrom

Supported by the .NET Compact Framework.

Ends a pending asynchronous read from a specific endpoint.
public methodEndSend

Supported by the .NET Compact Framework.

Ends a pending asynchronous send.
public methodEndSendTo

Supported by the .NET Compact Framework.

Ends a pending asynchronous send to a specific location.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodGetHashCode

Supported by the .NET Compact Framework.

Overridden. See Object.GetHashCode.
public methodGetSocketOption

Supported by the .NET Compact Framework.

Overloaded. Returns the value of a Socket option.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodIOControl

Supported by the .NET Compact Framework.

Sets low-level operating modes for the Socket.
public methodListen

Supported by the .NET Compact Framework.

Places a Socket in a listening state.
public methodPoll

Supported by the .NET Compact Framework.

Determines the status of the Socket.
public methodReceive

Supported by the .NET Compact Framework.

Overloaded. Receives data from a bound Socket.
public methodReceiveFrom

Supported by the .NET Compact Framework.

Overloaded. Receives a datagram and stores the source endpoint.
public methodstatic (Shared in Visual Basic)Select

Supported by the .NET Compact Framework.

Determines the status of one or more sockets.
public methodSend

Supported by the .NET Compact Framework.

Overloaded. Sends data to a connected Socket.
public methodSendTo

Supported by the .NET Compact Framework.

Overloaded. Sends data to a specific endpoint.
public methodSetSocketOption

Supported by the .NET Compact Framework.

Overloaded. Sets a Socket option.
public methodShutdown

Supported by the .NET Compact Framework.

Disables sends and receives on a Socket.
public methodToString (inherited from Object)

Supported by the .NET Compact Framework.

Returns a String that represents the current Object.

Protected Methods

protected methodDispose

Supported by the .NET Compact Framework.

Releases the unmanaged resources used by the Socket, and optionally disposes of the managed resources.
protected methodFinalize

Supported by the .NET Compact Framework.

Overridden. Frees resources used by the Socket class.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.

See Also

Socket Class | System.Net.Sockets Namespace

Show: