Files
DotNetty/examples/SecureChat.Client/SecureChatClientHandler.cs
Max Gortman 4f28a55b48 Move to .NET Core tooling (#170)
Motivation
.NET Core tooling allows building for both .NET Framework and .NET Standard while easing pains of running tests and packaging.

Modifications
- csproj -> xproj + project.json
- support for .NET Standard 1.3
- build script is now based on CAKE
- using dotnet CLI for building, testing, packing
- strong name by default (snk included)

Result
DotNetty works on .NET Core and any other platform supporting .NET Standard 1.3+.
2016-11-07 17:50:24 -08:00

20 lines
695 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 SecureChat.Client
{
using System;
using DotNetty.Transport.Channels;
public class SecureChatClientHandler : 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(e.StackTrace);
contex.CloseAsync();
}
}
}