MCPcopy
hub / github.com/cloudflare/cloudflared / NewHTTPResponseReadWriterAcker

Function NewHTTPResponseReadWriterAcker

connection/connection.go:182–189  ·  view source on GitHub ↗

NewHTTPResponseReadWriterAcker returns a new instance of HTTPResponseReadWriteAcker.

(w ResponseWriter, flusher http.Flusher, req *http.Request)

Source from the content-addressed store, hash-verified

180
181// NewHTTPResponseReadWriterAcker returns a new instance of HTTPResponseReadWriteAcker.
182func NewHTTPResponseReadWriterAcker(w ResponseWriter, flusher http.Flusher, req *http.Request) *HTTPResponseReadWriteAcker {
183 return &HTTPResponseReadWriteAcker{
184 r: req.Body,
185 w: w,
186 f: flusher,
187 req: req,
188 }
189}
190
191func (h *HTTPResponseReadWriteAcker) Read(p []byte) (int, error) {
192 return h.r.Read(p)

Callers 6

ProxyHTTPMethod · 0.92
TestConnectionsFunction · 0.92
proxyTCPFunction · 0.92
wsEchoEndpointFunction · 0.85
wsFlakyEndpointFunction · 0.85
ServeHTTPMethod · 0.85

Calls

no outgoing calls

Tested by 4

TestConnectionsFunction · 0.74
proxyTCPFunction · 0.74
wsEchoEndpointFunction · 0.68
wsFlakyEndpointFunction · 0.68