Example #1
0
        public void Run(Socket connectedSocket)
        {
            using (TelnetStream stream = new TelnetStream(connectedSocket, this, true))
            {
                stillConnected = true;

                ConsolePrintCallback receiver = new ConsolePrintCallback(this, stream);
                new Thread(receiver.Run).Start();

                while (stillConnected)
                {
                    stream.SendLine(Console.ReadLine());
                }
            }
        }
Example #2
0
 public ConsolePrintCallback(TelnetClient client, TelnetStream stream)
 {
     this.client = client;
     this.stream = stream;
 }