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

Method Write

connection/http2.go:358–371  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

356}
357
358func (rp *http2RespWriter) Write(p []byte) (n int, err error) {
359 defer func() {
360 // Implementer of OriginClient should make sure it doesn't write to the connection after Proxy returns
361 // Register a recover routine just in case.
362 if r := recover(); r != nil {
363 rp.log.Debug().Msgf("Recover from http2 response writer panic, error %s", debug.Stack())
364 }
365 }()
366 n, err = rp.w.Write(p)
367 if err == nil && rp.shouldFlush {
368 rp.flusher.Flush()
369 }
370 return n, err
371}
372
373func (rp *http2RespWriter) Close() error {
374 return nil

Callers

nothing calls this directly

Calls 2

WriteMethod · 0.65
FlushMethod · 0.45

Tested by

no test coverage detected