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()); } } }
public ConsolePrintCallback(TelnetClient client, TelnetStream stream) { this.client = client; this.stream = stream; }