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

Function newTCPRequestBody

proxy/proxy_test.go:755–764  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

753}
754
755func newTCPRequestBody(data []byte) *requestBody {
756 pr, pw := io.Pipe()
757 go func() {
758 _, _ = pw.Write(data)
759 }()
760 return &requestBody{
761 pr: pr,
762 pw: pw,
763 }
764}
765
766func (r *requestBody) Read(p []byte) (n int, err error) {
767 return r.pr.Read(p)

Callers 1

TestConnectionsFunction · 0.85

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected