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

Function encodeReply

types.go:206–216  ·  view source on GitHub ↗
(e *encoder, option uint32, reply optionReply)

Source from the content-addressed store, hash-verified

204}
205
206func encodeReply(e *encoder, option uint32, reply optionReply) {
207 e.writeUint64(repMagic)
208 e.writeUint32(option)
209 e.writeUint32(reply.code())
210 e.buf = []byte{}
211 var buf []byte
212 reply.encode(e)
213 buf, e.buf = e.buf, nil
214 e.writeUint32(uint32(len(buf)))
215 e.write(buf)
216}
217
218const (
219 cRepAck = 1

Callers 1

serverHandshakeFunction · 0.85

Calls 5

writeUint64Method · 0.80
writeUint32Method · 0.80
writeMethod · 0.80
codeMethod · 0.65
encodeMethod · 0.65

Tested by

no test coverage detected