public Tunnel(string IP, int Port, int BufferSize) { client = new TcpClients(BufferSize); client.OnReceive += Client_OnReceive; client.OnClose += Client_OnClose; client.Connect(IP, Port); }
public void Connect(string ip, int port) { while (_tcpClients == null) { Thread.Sleep(10); } _tcpClients.Connect(ip, port); }