Socket Methods
.NET Framework 3.5
The Socket type exposes the following members.
| Name | Description | |
|---|---|---|
|
Accept | Creates a new Socket for a newly created connection. |
|
AcceptAsync | Begins an asynchronous operation to accept an incoming connection attempt. |
|
BeginAccept | Overloaded. Begins an asynchronous operation to accept an incoming connection attempt. |
|
BeginConnect | Overloaded. Begins an asynchronous request for a remote host connection. |
|
BeginDisconnect | Begins an asynchronous request to disconnect from a remote endpoint. |
|
BeginReceive | Overloaded. Begins to asynchronously receive data from a connected Socket. |
|
BeginReceiveFrom | Begins to asynchronously receive data from a specified network device. |
|
BeginReceiveMessageFrom | Begins to asynchronously receive the specified number of bytes of data into the specified location of the data buffer, using the specified SocketFlags, and stores the endpoint and packet information.. |
|
BeginSend | Overloaded. Sends data asynchronously to a connected Socket. |
|
BeginSendFile | Overloaded. Sends a file asynchronously to a connected Socket object. |
|
BeginSendTo | Sends data asynchronously to a specific remote host. |
|
Bind | Associates a Socket with a local endpoint. |
|
Close | Overloaded. Closes the Socket connection and releases all associated resources. |
|
Connect | Overloaded. Establishes a connection to a remote host. |
|
ConnectAsync | Begins an asynchronous request for a remote host connection. |
|
Disconnect | Closes the socket connection and allows reuse of the socket. |
|
DisconnectAsync | Begins an asynchronous request to disconnect from a remote endpoint. |
|
Dispose | Releases the unmanaged resources used by the Socket, and optionally disposes of the managed resources. |
|
DuplicateAndClose | Duplicates the socket reference for the target process, and closes the socket for this process. |
|
EndAccept | Overloaded. Asynchronously accepts an incoming connection attempt. |
|
EndConnect | Ends a pending asynchronous connection request. |
|
EndDisconnect | Ends a pending asynchronous disconnect request. |
|
EndReceive | Overloaded. Ends a pending asynchronous read. |
|
EndReceiveFrom | Ends a pending asynchronous read from a specific endpoint. |
|
EndReceiveMessageFrom | Ends a pending asynchronous read from a specific endpoint. This method also reveals more information about the packet than EndReceiveFrom. |
|
EndSend | Overloaded. Ends a pending asynchronous send. |
|
EndSendFile | Ends a pending asynchronous send of a file. |
|
EndSendTo | Ends a pending asynchronous send to a specific location. |
|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
|
Finalize | Frees resources used by the Socket class. (Overrides Object.Finalize().) |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetSocketOption | Overloaded. Returns the value of a Socket option. |
|
GetType | Gets the type of the current instance. (Inherited from Object.) |
|
IOControl | Overloaded. Sets low-level operating modes for the Socket. |
|
Listen | Places a Socket in a listening state. |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Poll | Determines the status of the Socket. |
|
Receive | Overloaded. Receives data from a bound Socket. |
|
ReceiveAsync | Begins an asynchronous request to receive data from a connected Socket object. |
|
ReceiveFrom | Overloaded. Receives a datagram and stores the source endpoint. |
|
ReceiveFromAsync | Begins to asynchronously receive data from a specified network device. |
|
ReceiveMessageFrom | Receives the specified number of bytes of data into the specified location of the data buffer, using the specified SocketFlags, and stores the endpoint and packet information. |
|
ReceiveMessageFromAsync | Begins to asynchronously receive the specified number of bytes of data into the specified location in the data buffer, using the specified SocketAsyncEventArgs.SocketFlags, and stores the endpoint and packet information. |
|
Select | Determines the status of one or more sockets. |
|
Send | Overloaded. Sends data to a connected Socket. |
|
SendAsync | Sends data asynchronously to a connected Socket object. |
|
SendFile | Overloaded. Sends a file and optional data synchronously to a connected Socket. |
|
SendPacketsAsync | Sends a collection of files or in memory data buffers asynchronously to a connected Socket object. |
|
SendTo | Overloaded. Sends data to a specific endpoint. |
|
SendToAsync | Sends data asynchronously to a specific remote host. |
|
SetSocketOption | Overloaded. Sets a Socket option. |
|
Shutdown | Disables sends and receives on a Socket. |
|
ToString | Returns a string that represents the current object. (Inherited from Object.) |