MCPcopy
hub / github.com/cli/cli / Write

Method Write

internal/codespaces/portforwarder/port_forwarder.go:429–432  ·  view source on GitHub ↗

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

(p []byte)

Source from the content-addressed store, hash-verified

427
428// Write wraps the underlying ReadWriteCloser's Write method and keeps the session alive with the "output" traffic type.
429func (t *trafficMonitor) Write(p []byte) (n int, err error) {
430 t.fwd.KeepAlive(trafficTypeOutput)
431 return t.rwc.Write(p)
432}
433
434// Close closes the underlying ReadWriteCloser.
435func (t *trafficMonitor) Close() error {

Callers

nothing calls this directly

Calls 2

KeepAliveMethod · 0.65
WriteMethod · 0.65

Tested by

no test coverage detected