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