Beispiel #1
0
        public TelnetConnection(string InHostname, int InPort)
        {
            mSock = new TcpClient(InHostname, InPort);

            // socket is now ready to send and receive. Clear the disconnected signal.
            IsDisconnectedSignal.Reset();
        }
Beispiel #2
0
 public void Disconnect()
 {
     if (IsDisconnectedSignal.State == false)
     {
         try
         {
             mSock.Client.Disconnect(false);
         }
         catch (SocketException)
         {
         }
         IsDisconnectedSignal.Set();
     }
 }