C# Class OpenNos.Core.Networking.Communication.Scs.Client.Tcp.TcpHelper

This class is used to simplify TCP socket operations.
Mostrar archivo Open project: OpenNos/OpenNos

Public Methods

Method Description
ConnectToServer ( EndPoint endPoint, int timeoutMs ) : Socket

This code is used to connect to a TCP socket with timeout option.

Method Details

ConnectToServer() public static method

This code is used to connect to a TCP socket with timeout option.
Throws SocketException if can not connect. /// Throws TimeoutException if can not connect within specified timeoutMs ///
public static ConnectToServer ( EndPoint endPoint, int timeoutMs ) : Socket
endPoint System.Net.EndPoint IP endpoint of remote server
timeoutMs int Timeout to wait until connect
return Socket