protected override void Decode(IChannelHandlerContext context, IByteBuffer message, List <object> output) { try { var baseMessage = GkParser.Decode(message); output.Add(baseMessage); } finally { // message.SafeRelease(); } }
protected override void Decode(IChannelHandlerContext context, DatagramPacket message, List <object> output) { try { if (message is DatagramPacket packet) { var buffer = packet.Content; var baseMessage = GkParser.Decode(buffer); // var baseUdpMsg = (BaseUdpMessage)baseMessage; var baseUdpMsg = new BaseUdpMessage(baseMessage, packet.Recipient); output.Add(baseUdpMsg); } } finally { // message.SafeRelease(); } }