C# Class System.Net.Sockets.TcpClient

显示文件 Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
BeginConnectCore IAsyncResult
BeginConnectCore IAsyncResult
ConnectAsyncCore System.Threading.Tasks.Task
ConnectAsyncCore System.Threading.Tasks.Task
CreateSocket Socket
DisposeCore void
EndConnectCore void
InitializeClientSocket void
TcpClient System.Diagnostics

Public Methods

Method Description
BeginConnect ( IPAddress address, int port, AsyncCallback requestCallback, object state ) : IAsyncResult
BeginConnect ( string host, int port, AsyncCallback requestCallback, object state ) : IAsyncResult
Close ( ) : void
Connect ( IPAddress address, int port ) : void
Connect ( IPEndPoint remoteEP ) : void
Connect ( string hostname, int port ) : void
ConnectAsync ( IPAddress address, int port ) : System.Threading.Tasks.Task
ConnectAsync ( string host, int port ) : System.Threading.Tasks.Task
Dispose ( ) : void
EndConnect ( IAsyncResult asyncResult ) : void
GetStream ( ) : NetworkStream
TcpClient ( IPEndPoint localEP )
TcpClient ( string hostname, int port )
TcpClient ( ) : System.Diagnostics
TcpClient ( AddressFamily family ) : System.Diagnostics

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
BeginConnectCore ( IPAddress address, int port, AsyncCallback requestCallback, object state ) : IAsyncResult
BeginConnectCore ( string host, int port, AsyncCallback requestCallback, object state ) : IAsyncResult
ConnectAsyncCore ( IPAddress address, int port ) : System.Threading.Tasks.Task
ConnectAsyncCore ( string host, int port ) : System.Threading.Tasks.Task
CreateSocket ( ) : Socket
DisposeCore ( ) : void
EndConnectCore ( Socket socket, IAsyncResult asyncResult ) : void
InitializeClientSocket ( ) : void
TcpClient ( Socket acceptedSocket ) : System.Diagnostics

Method Details

BeginConnect() public method

public BeginConnect ( IPAddress address, int port, AsyncCallback requestCallback, object state ) : IAsyncResult
address IPAddress
port int
requestCallback AsyncCallback
state object
return IAsyncResult

BeginConnect() public method

public BeginConnect ( string host, int port, AsyncCallback requestCallback, object state ) : IAsyncResult
host string
port int
requestCallback AsyncCallback
state object
return IAsyncResult

Close() public method

public Close ( ) : void
return void

Connect() public method

public Connect ( IPAddress address, int port ) : void
address IPAddress
port int
return void

Connect() public method

public Connect ( IPEndPoint remoteEP ) : void
remoteEP IPEndPoint
return void

Connect() public method

public Connect ( string hostname, int port ) : void
hostname string
port int
return void

ConnectAsync() public method

public ConnectAsync ( IPAddress address, int port ) : System.Threading.Tasks.Task
address IPAddress
port int
return System.Threading.Tasks.Task

ConnectAsync() public method

public ConnectAsync ( string host, int port ) : System.Threading.Tasks.Task
host string
port int
return System.Threading.Tasks.Task

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

EndConnect() public method

public EndConnect ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult
return void

GetStream() public method

public GetStream ( ) : NetworkStream
return NetworkStream

TcpClient() public method

public TcpClient ( IPEndPoint localEP )
localEP IPEndPoint

TcpClient() public method

public TcpClient ( string hostname, int port )
hostname string
port int

TcpClient() public method

public TcpClient ( ) : System.Diagnostics
return System.Diagnostics

TcpClient() public method

public TcpClient ( AddressFamily family ) : System.Diagnostics
family AddressFamily
return System.Diagnostics