TcpClient Methods
.NET Framework 4
The TcpClient type exposes the following members.
| Name | Description | |
|---|---|---|
|
BeginConnect(IPAddress, Int32, AsyncCallback, Object) | Begins an asynchronous request for a remote host connection. The remote host is specified by an IPAddress and a port number (Int32). |
|
BeginConnect(IPAddress[], Int32, AsyncCallback, Object) | Begins an asynchronous request for a remote host connection. The remote host is specified by an IPAddress array and a port number (Int32). |
|
BeginConnect(String, Int32, AsyncCallback, Object) | Begins an asynchronous request for a remote host connection. The remote host is specified by a host name (String) and a port number (Int32). |
|
Close | Disposes this TcpClient instance and requests that the underlying TCP connection be closed. |
|
Connect(IPEndPoint) | Connects the client to a remote TCP host using the specified remote network endpoint. |
|
Connect(IPAddress, Int32) | Connects the client to a remote TCP host using the specified IP address and port number. |
|
Connect(IPAddress[], Int32) | Connects the client to a remote TCP host using the specified IP addresses and port number. |
|
Connect(String, Int32) | Connects the client to the specified port on the specified host. |
|
Dispose | Releases the unmanaged resources used by the TcpClient and optionally releases the managed resources. |
|
EndConnect | Asynchronously accepts an incoming connection attempt. |
|
Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
|
Finalize | Frees resources used by the TcpClient class. (Overrides Object.Finalize().) |
|
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetStream | Returns the NetworkStream used to send and receive data. |
|
GetType | Gets the Type of the current instance. (Inherited from Object.) |
|
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
|
IDisposable.Dispose | Infrastructure. Releases all resources used by the TcpClient. |