protected override void Decode(IChannelHandlerContext context, IByteBuffer input, List <object> output) { try{ var buffer = GkParser.Split(input); if (buffer == null) { return; } output.Add(buffer); } finally { ResetBuffer(input); } }
protected override void Decode(IChannelHandlerContext context, DatagramPacket message, List <object> output) { Logger.Info("FrameSplitDecoder 收到server端消息"); var input = message.Content; try { var buffer = GkParser.Split(input); if (buffer == null) { return; } output.Add(new DatagramPacket(buffer, message.Sender)); } finally { ResetBuffer(input); } }