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


C# IChannelHandlerContext.Read方法代码示例

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


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

示例1: Read

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

示例2: ResumeReadingIfNecessary

 void ResumeReadingIfNecessary(IChannelHandlerContext context)
 {
     if (this.InboundBacklogSize == this.mqttTransportSettings.MaxPendingInboundMessages - 1) // we picked up a packet from full queue - now we have more room so order another read
     {
         context.Read();
     }
 }
开发者ID:tomconte,项目名称:azure-iot-sdks,代码行数:7,代码来源:MqttIotHubAdapter.cs

示例3: 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

示例4: ChannelReadComplete

 public override void ChannelReadComplete(IChannelHandlerContext context)
 {
     base.ChannelReadComplete(context);
     if (this.InboundBacklogSize < this.mqttTransportSettings.MaxPendingInboundMessages)
     {
         context.Read();
     }
 }
开发者ID:tomconte,项目名称:azure-iot-sdks,代码行数:8,代码来源:MqttIotHubAdapter.cs

示例5: ResumeReadingIfNecessary

 void ResumeReadingIfNecessary(IChannelHandlerContext context)
 {
     if (this.InboundBacklogSize == this.settings.MaxPendingInboundMessages - 1) // we picked up a packet from full queue - now we have more room so order another read
     {
         if (MqttIotHubAdapterEventSource.Log.IsVerboseEnabled)
         {
             MqttIotHubAdapterEventSource.Log.Verbose("Resuming reading from channel as queue freed up.", string.Format("deviceId: {0}, channel: {1}", this.deviceId, context.Channel));
         }
         context.Read();
     }
 }
开发者ID:nberdy,项目名称:azure-iot-protocol-gateway,代码行数:11,代码来源:MqttIotHubAdapter.cs

示例6: ChannelReadComplete

 public override void ChannelReadComplete(IChannelHandlerContext context)
 {
     base.ChannelReadComplete(context);
     int inboundBacklogSize = this.InboundBacklogSize;
     if (inboundBacklogSize < this.settings.MaxPendingInboundMessages)
     {
         context.Read();
     }
     else
     {
         if (MqttIotHubAdapterEventSource.Log.IsVerboseEnabled)
         {
             MqttIotHubAdapterEventSource.Log.Verbose(
                 "Not reading per full inbound message queue",
                 string.Format("deviceId: {0}, messages queued: {1}, channel: {2}", this.deviceId, inboundBacklogSize, context.Channel));
         }
     }
 }
开发者ID:nberdy,项目名称:azure-iot-protocol-gateway,代码行数:18,代码来源:MqttIotHubAdapter.cs

示例7: ChannelActive

        public override void ChannelActive(IChannelHandlerContext context)
        {
            this.stateFlags = StateFlags.WaitingForConnect;
            TimeSpan? timeout = this.settings.ConnectArrivalTimeout;
            if (timeout.HasValue)
            {
                context.Channel.EventLoop.Schedule(CheckConnectTimeoutCallback, context, timeout.Value);
            }
            base.ChannelActive(context);

            context.Read();
        }
开发者ID:nberdy,项目名称:azure-iot-protocol-gateway,代码行数:12,代码来源:MqttIotHubAdapter.cs

示例8: Read

        public override void Read(IChannelHandlerContext context)
        {
            State oldState = this.state;
            if ((oldState & State.AuthenticationCompleted) == 0)
            {
                this.state = oldState | State.ReadRequestedBeforeAuthenticated;
            }

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


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