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

Function DefaultStreamHandler

ingress/origin_connection.go:29–31  ·  view source on GitHub ↗

DefaultStreamHandler is an implementation of streamHandlerFunc that performs a two way io.Copy between originConn and remoteConn.

(originConn io.ReadWriter, remoteConn net.Conn, log *zerolog.Logger)

Source from the content-addressed store, hash-verified

27// DefaultStreamHandler is an implementation of streamHandlerFunc that
28// performs a two way io.Copy between originConn and remoteConn.
29func DefaultStreamHandler(originConn io.ReadWriter, remoteConn net.Conn, log *zerolog.Logger) {
30 stream.Pipe(originConn, remoteConn, log)
31}
32
33// tcpConnection is an OriginConnection that directly streams to raw TCP.
34type tcpConnection struct {

Callers

nothing calls this directly

Calls 1

PipeFunction · 0.92

Tested by

no test coverage detected