예제 #1
0
 public override void ChannelActive(IChannelHandlerContext ctx)
 {
     if (!this.HandleNewChannel(ctx))
     {
         ThrowHelper.ThrowArgumentException_CannotDetermineToAcceptOrRejectAChannel(ctx);
     }
     else
     {
         ctx.FireChannelActive();
     }
 }
            public override void ChannelActive(IChannelHandlerContext ctx)
            {
                DefaultFullHttpRequest upgradeRequest =
                    new DefaultFullHttpRequest(DotNetty.Codecs.Http.HttpVersion.Http11, HttpMethod.Get, "/", Unpooled.Empty);

                // Set HOST header as the remote peer may require it.
                var remote = (IPEndPoint)ctx.Channel.RemoteAddress;

                //String hostString = remote.getHostString();
                //if (hostString == null)
                //{
                //    hostString = remote.getAddress().getHostAddress();
                //}
                upgradeRequest.Headers.Set(HttpHeaderNames.Host, _self._targetHost + ':' + remote.Port);

                ctx.WriteAndFlushAsync(upgradeRequest);

                ctx.FireChannelActive();

                // Done with this handler, remove it from the pipeline.
                ctx.Pipeline.Remove(this);

                _self.ConfigureEndOfPipeline(ctx.Pipeline);
            }
예제 #3
0
 public override void ChannelActive(IChannelHandlerContext context)
 {
     SendInitialMessage(context);
     context.FireChannelActive();
 }
예제 #4
0
 public override void ChannelActive(IChannelHandlerContext context)
 {
     _logger.LogInformation("Channel active '{0}'", context.Channel.Id.AsLongText());
     _activeInActiveHandler(context.Channel, true);
     context.FireChannelActive();
 }
예제 #5
0
 public override void ChannelActive(IChannelHandlerContext context)
 {
     _log.Debug("connected to {0}", context.Channel.RemoteAddress);
     _fsm.Tell(new ClientFSM.Connected(context.Channel));
     context.FireChannelActive();
 }
예제 #6
0
 public void ChannelActive(IChannelHandlerContext context)
 {
     context.FireChannelActive();
 }
예제 #7
0
            public void ChannelActive(IChannelHandlerContext context)
            {
                context.FireChannelActive();

                this.ReadIfIsAutoRead();
            }
예제 #8
0
 public override void ChannelActive(IChannelHandlerContext ctx)
 {
     ctx.FireChannelActive();
 }
예제 #9
0
 public override void ChannelActive(IChannelHandlerContext context)
 {
     context.FireChannelActive();
     context.Read();
 }
예제 #10
0
 public override void ChannelActive(IChannelHandlerContext ctx)
 {
     _log.Debug("Channel {0} active", ctx.Channel);
     ctx.FireChannelActive();
 }
예제 #11
0
 public override void ChannelActive(IChannelHandlerContext ctx)
 {
     Console.WriteLine("激活时间是:" + DateTime.Now);
     Console.WriteLine("HeartBeatClientHandler channelActive");
     ctx.FireChannelActive();
 }
예제 #12
0
 /**
  * channel链路每次active的时候,将其连接的次数重新☞ 0
  */
 public override void ChannelActive(IChannelHandlerContext ctx)
 {
     Console.WriteLine("当前链路已经激活了,重连尝试次数重新置为0");
     attempts = 0;
     ctx.FireChannelActive();
 }
예제 #13
0
 public override void ChannelActive(IChannelHandlerContext context)
 {
     RegisterFiredEvent(SupportedEvent.ChannelActive);
     context.FireChannelActive();
 }
예제 #14
0
 public override void ChannelActive(IChannelHandlerContext context)
 {
     _logger.Debug($"{context.Channel} ACTIVE");
     context.FireChannelActive();
 }
예제 #15
0
        public override void ChannelActive(IChannelHandlerContext context)
        {
            Log.Debug($"{context.Name}: ChannelActive");

            context.FireChannelActive();
        }
예제 #16
0
 public override void ChannelActive(IChannelHandlerContext context)
 {
     Log(Event.ACTIVE);
     context.FireChannelActive();
 }
예제 #17
0
 public override void ChannelActive(IChannelHandlerContext ctx)
 {
     logger.Info($"channel active", ctx.Channel.ToString());
     ctx.FireChannelActive();
 }
예제 #18
0
 public override void ChannelActive(IChannelHandlerContext ctx)
 {
     Logger().LogDebug($"Channel {ctx.Channel} active");
     ctx.FireChannelActive();
 }
 public IChannelHandlerContext FireChannelActive()
 {
     _ = _ctx.FireChannelActive();
     return(this);
 }
예제 #20
0
 public override void ChannelActive(IChannelHandlerContext ctx)
 {
     if (this.Logger.IsEnabled(this.InternalLevel))
     {
         this.Logger.Log(this.InternalLevel, this.Format(ctx, "ACTIVE"));
     }
     ctx.FireChannelActive();
 }
예제 #21
0
 public virtual void ChannelActive(IChannelHandlerContext context) => context.FireChannelActive();
 public override void ChannelActive(IChannelHandlerContext context)
 {
     Log.Information("GeneralChannelHandler.ChannelActive() called");
     context.FireChannelActive();
 }