/// <summary> /// 读写超时通知 /// </summary> /// <param name="ctx"></param> /// <param name="evt"></param> public override void UserEventTriggered(IChannelHandlerContext ctx, object evt) { base.UserEventTriggered(ctx, evt); ClientEventHandler.SendPingMsg(ctx); }
/// <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); }