MCPcopy
hub / github.com/cli/cli / Read

Method Read

internal/codespaces/portforwarder/port_forwarder.go:445–448  ·  view source on GitHub ↗

Read wraps the underlying ReadWriteCloser's Read method and keeps the session alive with the "input" traffic type.

(p []byte)

Source from the content-addressed store, hash-verified

443
444// Read wraps the underlying ReadWriteCloser's Read method and keeps the session alive with the "input" traffic type.
445func (t *trafficMonitor) Read(p []byte) (n int, err error) {
446 t.fwd.KeepAlive(trafficTypeInput)
447 return t.rwc.Read(p)
448}
449
450// Write wraps the underlying ReadWriteCloser's Write method and keeps the session alive with the "output" traffic type.
451func (t *trafficMonitor) Write(p []byte) (n int, err error) {

Callers 2

TestTryLockFunction · 0.45
NewConfigFunction · 0.45

Calls 1

KeepAliveMethod · 0.65

Tested by 1

TestTryLockFunction · 0.36