Exemplo n.º 1
0
        public override void ChannelRead(IChannelHandlerContext context, object message)
        {
            switch (message)
            {
            case Debug msg:
                _listener.OnDebug(msg.Text, context.Channel.Id.AsLongText());
                break;

            case LogoutRequest msg:
                _listener.OnLogout(context.Channel.Id.AsLongText());
                context.CloseAsync();
                break;

            case UnsequencedData msg:
                _listener.OnMessage(msg.Message, context.Channel.Id.AsLongText());
                break;
            }
        }