Documentation
¶
Overview ¶
Package relay provides bidirectional stream copying with an optional idle-timeout watchdog. Buffers are pooled to reduce allocations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Relay ¶
Relay copies data between a and b concurrently until either side closes.
If timeout > 0 an idle watchdog aborts both sides when no bytes are transferred for the timeout duration. For QUIC streams the watchdog uses CancelRead+CancelWrite so the peer observes a real stream-reset rather than a silent EOF. For non-QUIC RWCs the watchdog falls back to Close. Both a and b are always closed before Relay returns.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.