// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Telnet.Client { using System; using DotNetty.Transport.Channels; public class TelnetClientHandler : SimpleChannelInboundHandler { protected override void ChannelRead0(IChannelHandlerContext contex, string msg) { Console.WriteLine(msg); } public override void ExceptionCaught(IChannelHandlerContext contex, Exception e) { Console.WriteLine(DateTime.Now.Millisecond); Console.WriteLine("{0}", e.StackTrace); contex.CloseAsync(); } } }