mirror of
https://github.com/Azure/DotNetty.git
synced 2026-10-18 22:30:36 +08:00
a9850b4775
Squashed commit: [7fbc42e] comment about BigInteger.ToByteArray() [3be0644] delete ChannelInboundHander and ChannelInboudnHandlerAdpter [b07f8d9] fix Microsoft.Practices compile error, use echo proj's version [c19a551] sample:discard,factorial,securechat,telnet
23 lines
723 B
C#
23 lines
723 B
C#
// 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<string>
|
|
{
|
|
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();
|
|
}
|
|
}
|
|
} |