code: @Override
      protected void encode(ChannelHandlerContext ctx, ByteBuf buf, List<Object> out) throws Exception {
          // Need to retain() the buffer here to avoid a io.netty.util.IllegalReferenceCountException.
          out.add(new DatagramPacket(buf.retain(), remoteAddress));
      }
docs: {@inheritDoc}