Discover Packages
github.com/tnldotdev/tnl
internal
streamcopy
package
Version:
v0.1.0-rc.39
Opens a new window with list of versions in this module.
Published: Oct 3, 2026
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package streamcopy copies bytes in both directions and preserves half-closes.
type Result struct {
LeftToRight int64
RightToLeft int64
}
Copy waits for both directions and half-closes each destination when supported.
the caller must close or set deadlines on the connections to cancel the copy.
an unexpected error in either direction closes both connections.
CopyObserved is Copy with a callback after each write. the callbacks may run
at the same time and must return quickly.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.