MCPcopy Create free account
hub / github.com/imroc/req / setBuffer

Method setBuffer

internal/http2/pipe.go:35–42  ·  view source on GitHub ↗

setBuffer initializes the pipe buffer. It has no effect if the pipe is already closed.

(b pipeBuffer)

Source from the content-addressed store, hash-verified

33// setBuffer initializes the pipe buffer.
34// It has no effect if the pipe is already closed.
35func (p *pipe) setBuffer(b pipeBuffer) {
36 p.mu.Lock()
37 defer p.mu.Unlock()
38 if p.err != nil || p.breakErr != nil {
39 return
40 }
41 p.b = b
42}
43
44func (p *pipe) Len() int {
45 p.mu.Lock()

Callers 1

handleResponseMethod · 0.80

Calls 2

LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected