// Code generated by xtgen; DO NOT EDIT. package ge import "encoding/binary" // QueryVersionReply is a zero-copy view over a QueryVersion reply; offsets count from reply byte 0. // It borrows the reply bytes: valid only until the Handler callback returns, because the read ring is reused. Copy what you keep. type QueryVersionReply struct{ raw []byte } // ParseQueryVersionReply validates raw (the whole reply, 32+4*length bytes) once; getters do not re-check. func ParseQueryVersionReply(raw []byte) (QueryVersionReply, bool) { if len(raw) < 32 { return QueryVersionReply{}, false } r := QueryVersionReply{raw: raw} return r, true } func (r QueryVersionReply) Raw() []byte { return r.raw } func (r QueryVersionReply) MajorVersion() uint16 { return uint16(binary.LittleEndian.Uint16(r.raw[8:])) } func (r QueryVersionReply) MinorVersion() uint16 { return uint16(binary.LittleEndian.Uint16(r.raw[10:])) }