Skip to content

Instantly share code, notes, and snippets.

@daschl
Created September 6, 2013 07:35
Show Gist options
  • Save daschl/6460684 to your computer and use it in GitHub Desktop.
Save daschl/6460684 to your computer and use it in GitHub Desktop.
encoding
@Override
protected void encodeHeader(ByteBuf buf, BinaryMemcacheRequestHeader header) {
buf.writeByte(header.getMagic());
buf.writeByte(header.getOpcode());
buf.writeShort(header.getKeyLength());
buf.writeByte(header.getExtrasLength());
buf.writeByte(header.getDataType());
buf.writeShort(header.getReserved());
buf.writeInt(header.getTotalBodyLength());
buf.writeInt(header.getOpaque());
buf.writeLong(header.getCAS());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment