C# Класс CqlSharp.Network.TcpClientExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
ConnectAsync ( this client, IPAddress address, int port, int timeout ) : Task

Connects the client to the given remote address and port, using a maximum timeout. The client will be closed when the timeout has passed and the client is still not connected

SetKeepAlive ( this client, ulong time ) : void

Sets the keep-alive interval for the socket.

SetKeepAlive ( this client, ulong time, ulong interval ) : void

Sets the keep-alive interval for the socket.

based on: http://www.codekeep.net/snippets/269152eb-726b-4cd5-a22d-4e7cef27f93f.aspx

Описание методов

ConnectAsync() публичный статический Метод

Connects the client to the given remote address and port, using a maximum timeout. The client will be closed when the timeout has passed and the client is still not connected
When a timeout has occured. In this case the socket will have been closed.
public static ConnectAsync ( this client, IPAddress address, int port, int timeout ) : Task
client this The client.
address System.Net.IPAddress The address to connect to.
port int The port to connect to.
timeout int The timeout in ms. Set to 0 to skip timeouts
Результат Task

SetKeepAlive() публичный статический Метод

Sets the keep-alive interval for the socket.
public static SetKeepAlive ( this client, ulong time ) : void
client this
time ulong Time between two keep alive "pings".
Результат void

SetKeepAlive() публичный статический Метод

Sets the keep-alive interval for the socket.
based on: http://www.codekeep.net/snippets/269152eb-726b-4cd5-a22d-4e7cef27f93f.aspx
public static SetKeepAlive ( this client, ulong time, ulong interval ) : void
client this TcpClient to set KeepAlive value on
time ulong Time between two keep alive "pings".
interval ulong Time between two keep alive "pings" when first one fails.
Результат void