Esempio n. 1
0
        public override async Task WriteAsync(IChannelHandlerContext ctx, object msg)
        {
            await base.WriteAsync(ctx, msg);

            NettyChannel channel = NettyChannel.GetOrAddChannel(ctx.Channel, _url, _handler);

            try
            {
                await _handler.SentAsync(channel, msg);
            }
            finally
            {
                NettyChannel.RemoveChannelIfDisconnected(ctx.Channel);
            }
        }
Esempio n. 2
0
 public virtual Task SentAsync(IChannel channel, object message)
 {
     return(_handler.SentAsync(channel, message));
 }