C# Class WebSocket.Portable.TcpConnection

Inheritance: WebSocket.Portable.Net.TcpConnectionBase
显示文件 Open project: NVentimiglia/WebSocket.Portable Class Usage Examples

Public Properties

Property Type Description
_client Sockets.Plugin.TcpSocketClient

Public Methods

Method Description
ConnectAsync ( string address, CancellationToken cancellationToken ) : Task
ConnectAsync ( string address, int port, CancellationToken cancellationToken ) : Task
ReadAsync ( byte buffer, int offset, int length, CancellationToken cancellationToken ) : Task

Receives data asynchronous.

ReadLineAsync ( CancellationToken cancellationToken ) : Task

Receives a line asynchronous.

TcpConnection ( bool useSsl ) : System

Initializes a new instance of the TcpConnection class.

WriteAsync ( byte buffer, int offset, int length, CancellationToken cancellationToken ) : Task

Sends data asynchronous.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources.

Method Details

ConnectAsync() public method

public ConnectAsync ( string address, CancellationToken cancellationToken ) : Task
address string
cancellationToken System.Threading.CancellationToken
return Task

ConnectAsync() public method

public ConnectAsync ( string address, int port, CancellationToken cancellationToken ) : Task
address string
port int
cancellationToken System.Threading.CancellationToken
return Task

Dispose() protected method

Releases unmanaged and - optionally - managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

ReadAsync() public method

Receives data asynchronous.
public ReadAsync ( byte buffer, int offset, int length, CancellationToken cancellationToken ) : Task
buffer byte The buffer.
offset int The offset.
length int The length.
cancellationToken System.Threading.CancellationToken The cancellation token.
return Task

ReadLineAsync() public method

Receives a line asynchronous.
public ReadLineAsync ( CancellationToken cancellationToken ) : Task
cancellationToken System.Threading.CancellationToken The cancellation token.
return Task

TcpConnection() public method

Initializes a new instance of the TcpConnection class.
public TcpConnection ( bool useSsl ) : System
useSsl bool if set to true the connection is secured using SSL.
return System

WriteAsync() public method

Sends data asynchronous.
public WriteAsync ( byte buffer, int offset, int length, CancellationToken cancellationToken ) : Task
buffer byte The buffer.
offset int The offset.
length int The length.
cancellationToken System.Threading.CancellationToken The cancellation token.
return Task

Property Details

_client public_oe property

public TcpSocketClient,Sockets.Plugin _client
return Sockets.Plugin.TcpSocketClient