C# 클래스 CqlSharp.Network.TcpClientExtensions

파일 보기 프로젝트 열기: reuzel/CqlSharp

공개 메소드들

메소드 설명
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