/// <summary>
 /// 通道激活
 /// </summary>
 /// <param name="context">通道处理上下文</param>
 public override void ChannelActive(IChannelHandlerContext context)
 {
     base.ChannelActive(context);
     ClientEventHandler.RecordLogEvent?.Invoke(false, $"通道激活:{context.Channel.RemoteAddress}");
     ClientEventHandler.IsConnect = true;
     ClientEventHandler.RunSendData(context);
 }
Пример #2
0
 /// <summary>
 /// 注册通道
 /// </summary>
 /// <param name="context">通道处理上下文</param>
 public override void ChannelRegistered(IChannelHandlerContext context)
 {
     base.ChannelRegistered(context);
     ClientEventHandler.RecordLogEvent?.Invoke(false, $"注册通道:{context.Channel.RemoteAddress}");
     ClientEventHandler.RunSendData(context);
 }