MCPcopy
hub / github.com/nats-io/nats.go / addCBuf

Method addCBuf

ws.go:371–377  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

369}
370
371func (r *websocketReader) addCBuf(b []byte) {
372 if r.dc == nil {
373 r.dc = &wsDecompressor{}
374 }
375 // Add a copy of the incoming buffer to the list of compressed buffers.
376 r.dc.addBuf(append([]byte(nil), b...))
377}
378
379func (r *websocketReader) drainPending(p []byte) int {
380 var n int

Callers 1

ReadMethod · 0.95

Calls 1

addBufMethod · 0.80

Tested by

no test coverage detected