public ConnectSocket ( string host, int port ) : void | ||
host | string | |
port | int | |
return | void |
public void ConnectSocket(string host, int port)
{
IPAddress[] ips = Dns.GetHostAddresses(host);
IPEndPoint e = new IPEndPoint(ips[0], port);
sock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
sock.BeginConnect(e, cck, this);
}
public void setup() { act = requestType.setup; Csep = 1; this.start(); tc.ConnectSocket(_host, _port); }