当前位置: 首页>>代码示例>>C#>>正文


C# IChannelHandlerContext.FireChannelReadComplete方法代码示例

本文整理汇总了C#中IChannelHandlerContext.FireChannelReadComplete方法的典型用法代码示例。如果您正苦于以下问题:C# IChannelHandlerContext.FireChannelReadComplete方法的具体用法?C# IChannelHandlerContext.FireChannelReadComplete怎么用?C# IChannelHandlerContext.FireChannelReadComplete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IChannelHandlerContext的用法示例。


在下文中一共展示了IChannelHandlerContext.FireChannelReadComplete方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ChannelReadComplete

 public virtual void ChannelReadComplete(IChannelHandlerContext context) => context.FireChannelReadComplete();
开发者ID:RabbitTeam,项目名称:DotNetty,代码行数:1,代码来源:ChannelHandlerAdapter.cs

示例2: ChannelReadComplete

 public override void ChannelReadComplete(IChannelHandlerContext context)
 {
     this.DiscardSomeReadBytes();
     if (this.decodeWasNull)
     {
         this.decodeWasNull = false;
         if (!context.Channel.Configuration.AutoRead)
         {
             context.Read();
         }
     }
     context.FireChannelReadComplete();
 }
开发者ID:l1183479157,项目名称:DotNetty,代码行数:13,代码来源:ByteToMessageDecoder.cs

示例3: ChannelInactive

 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();
         }
     }
 }
开发者ID:l1183479157,项目名称:DotNetty,代码行数:51,代码来源:ByteToMessageDecoder.cs

示例4: HandlerRemoved

 public override void HandlerRemoved(IChannelHandlerContext context)
 {
     IByteBuffer buf = this.InternalBuffer;
     int readable = buf.ReadableBytes;
     if (readable > 0)
     {
         IByteBuffer bytes = buf.ReadBytes(readable);
         buf.Release();
         context.FireChannelRead(bytes);
     }
     else
     {
         buf.Release();
     }
     this.cumulation = null;
     context.FireChannelReadComplete();
     this.HandlerRemovedInternal(context);
 }
开发者ID:l1183479157,项目名称:DotNetty,代码行数:18,代码来源:ByteToMessageDecoder.cs

示例5: ChannelReadComplete

 public override void ChannelReadComplete(IChannelHandlerContext context)
 {
     this.lastReadTime = TimeUtil.GetSystemTime();
     this.reading = false;
     context.FireChannelReadComplete();
 }
开发者ID:RabbitTeam,项目名称:DotNetty,代码行数:6,代码来源:ReadTimeoutHandler.cs

示例6: ChannelReadComplete

        public override void ChannelReadComplete(IChannelHandlerContext context)
        {
            if (this.readerIdleTime.Ticks > 0 || this.allIdleTime.Ticks > 0)
            {
                this.lastReadTime = TimeUtil.GetSystemTime();
                this.reading = false;
            }

            context.FireChannelReadComplete();
        }
开发者ID:RabbitTeam,项目名称:DotNetty,代码行数:10,代码来源:IdleStateHandler.cs

示例7: ChannelInputClosed

        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();
                }
            }
        }
开发者ID:helios-io,项目名称:helios,代码行数:53,代码来源:ByteToMessageDecoder.cs

示例8: HandlerRemoved

 public override void HandlerRemoved(IChannelHandlerContext context)
 {
     var buf = InternalBuffer;
     var readable = buf.ReadableBytes;
     if (readable > 0)
     {
         var bytes = buf.ReadBytes(readable);
         buf.Release();
         context.FireChannelRead(bytes);
     }
     else
     {
         buf.Release();
     }
     _cumulation = null;
     _numReads = 0;
     context.FireChannelReadComplete();
     HandlerRemovedInternal(context);
 }
开发者ID:helios-io,项目名称:helios,代码行数:19,代码来源:ByteToMessageDecoder.cs


注:本文中的IChannelHandlerContext.FireChannelReadComplete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。