MCPcopy Create free account
hub / github.com/Merovius/nbd / encode

Method encode

types.go:569–576  ·  view source on GitHub ↗
(e *encoder)

Source from the content-addressed store, hash-verified

567}
568
569func (r *structuredReply) encode(e *encoder) {
570 e.writeUint32(structuredReplyMagic)
571 e.writeUint16(r.flags)
572 e.writeUint16(r.typ)
573 e.writeUint64(r.handle)
574 e.writeUint32(r.length)
575 e.write(r.data)
576}
577
578func (r *structuredReply) decode(e *encoder) Error {
579 if e.uint64() != structuredReplyMagic {

Callers

nothing calls this directly

Calls 4

writeUint32Method · 0.80
writeUint16Method · 0.80
writeUint64Method · 0.80
writeMethod · 0.80

Tested by

no test coverage detected