Example #1
0
 public override void ChannelInactive(IChannelHandlerContext context)
 {
     context.FireExceptionCaught(new DecoderException("CleanupThrows"));
     context.FireChannelInactive();
 }
 public override void ChannelInactive(IChannelHandlerContext ctx)
 {
     this.completion.TrySetResult(this.bytesRead);
     ctx.FireChannelInactive();
 }
Example #3
0
 public override void ChannelInactive(IChannelHandlerContext ctx)
 {
     Logger().LogDebug($"Channel {ctx.Channel} inactive");
     ctx.FireChannelInactive();
 }
Example #4
0
 public override void ChannelInactive(IChannelHandlerContext ctx)
 {
     // Fail promise if Channel was closed
     this.completion.TrySetException(DefaultClosedChannelException);
     ctx.FireChannelInactive();
 }
Example #5
0
 public override void ChannelInactive(IChannelHandlerContext ctx)
 {
     if (this.Logger.IsEnabled(this.InternalLevel))
     {
         this.Logger.Log(this.InternalLevel, this.Format(ctx, "INACTIVE"));
     }
     ctx.FireChannelInactive();
 }
 public override void ChannelInactive(IChannelHandlerContext ctx)
 {
     ThreadLocalObjectList output = ThreadLocalObjectList.Take();
     try
     {
         if (this.cumulation != null)
         {
             this.CallDecode(ctx, this.cumulation, output);
             this.DecodeLast(ctx, this.cumulation, output);
         }
         else
         {
             this.DecodeLast(ctx, Unpooled.Empty, output);
         }
     }
     catch (DecoderException e)
     {
         throw e;
     }
     catch (Exception e)
     {
         throw new DecoderException(e);
     }
     finally
     {
         try
         {
             if (this.cumulation != null)
             {
                 this.cumulation.Release();
                 this.cumulation = null;
             }
             int size = output.Count;
             for (int i = 0; i < size; i++)
             {
                 ctx.FireChannelRead(output[i]);
             }
             if (size > 0)
             {
                 // Something was read, call fireChannelReadComplete()
                 ctx.FireChannelReadComplete();
             }
             ctx.FireChannelInactive();
         }
         finally
         {
             // recycle in all cases
             output.Return();
         }
     }
 }
Example #7
0
 public override void ChannelInactive(IChannelHandlerContext context)
 {
     _logger.Debug($"{context.Channel} INACTIVE");
     context.FireChannelInactive();
 }
Example #8
0
 public override void ChannelInactive(IChannelHandlerContext context)
 {
     DoFlush(context);
     _ = context.FireChannelInactive();
 }
Example #9
0
        public override void ChannelInactive(IChannelHandlerContext context)
        {
            Log.Debug($"{context.Name}: ChannelInactive");

            context.FireChannelInactive();
        }
Example #10
0
 public override void ChannelInactive(IChannelHandlerContext context)
 {
     _cumulativeBuffer.Release();
     context.FireChannelInactive();
 }
Example #11
0
 public override void ChannelInactive(IChannelHandlerContext context)
 {
     Log(Event.INACTIVE);
     context.FireChannelInactive();
 }
 public IChannelHandlerContext FireChannelInactive()
 {
     _ = _ctx.FireChannelInactive();
     return(this);
 }
 public override void ChannelInactive(IChannelHandlerContext ctx)
 {
     logger.Info($"channel Inactive", ctx.Channel.ToString());
     Reconnect();
     ctx.FireChannelInactive();
 }
Example #14
0
 public override void ChannelInactive(IChannelHandlerContext ctx)
 {
     _log.Debug("Channel {0} inactive", ctx.Channel);
     ctx.FireChannelInactive();
 }
 public override void ChannelInactive(IChannelHandlerContext ctx)
 {
     Console.WriteLine("链接关闭");
     Reconnect();
     ctx.FireChannelInactive();
 }
Example #16
0
 public virtual void ChannelInactive(IChannelHandlerContext context)
 {
     context.FireChannelInactive();
 }
Example #17
0
 public override void ChannelInactive(IChannelHandlerContext context)
 {
     context.FireChannelInactive();
 }
Example #18
0
 public void ChannelInactive(IChannelHandlerContext context) => context.FireChannelInactive();
Example #19
0
 public override void ChannelInactive(IChannelHandlerContext context)
 {
     RegisterFiredEvent(SupportedEvent.ChannelInactive);
     context.FireChannelInactive();
 }
Example #20
0
 public override void ChannelInactive(IChannelHandlerContext context)
 {
     _cumulativeBuffer.Release();
     context.FireChannelInactive();
 }
Example #21
0
 public override void ChannelInactive(IChannelHandlerContext ctx)
 {
     this.Destroy();
     ctx.FireChannelInactive();
 }
 public virtual void ChannelInactive(IChannelHandlerContext context) => context.FireChannelInactive();
Example #23
0
        private void ChannelInputClosed(IChannelHandlerContext context, bool callChannelInactive)
        {
            var output = RecyclableArrayList.Take();
            try
            {
                if (_cumulation != null)
                {
                    CallDecode(context, _cumulation, output);
                    DecodeLast(context, _cumulation, output);
                }
                else
                {
                    DecodeLast(context, Unpooled.Empty, output);
                }
            }
            catch (DecoderException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw new DecoderException(ex);
            }
            finally
            {
                try
                {
                    if (_cumulation != null)
                    {
                        _cumulation.Release();
                        _cumulation = null;
                    }
                    var size = output.Count;
                    FireChannelRead(context, output, size);

                    if (size > 0)
                    {
                        // Something was read, call FireChannelReadComplete()
                        context.FireChannelReadComplete();
                    }

                    if (callChannelInactive)
                    {
                        context.FireChannelInactive();
                    }
                }
                finally
                {
                    // recycle in all cases
                    output.Return();
                }
            }
        }