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); } }
public virtual Task SentAsync(IChannel channel, object message) { return(_handler.SentAsync(channel, message)); }