Documentation ¶
Index ¶
- func CopyBuffer(dst io.Writer, src io.Reader, buf []byte) (written int64, err error)
- func CopyEx(dst io.Writer, dstWriteCb SetDeadlineCallback, src io.Reader, ...) (written int64, err error)
- func CopyStream(dst io.Writer, src io.ReadCloser) chan struct{}
- func CopyTimeout(dst io.Writer, dstWriteCb SetDeadlineCallback, src io.Reader, ...) (written int64, err error)
- type CopiedSizeCallback
- type SetDeadlineCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyBuffer ¶
https://github.com/xtaci/kcptun/blob/master/server/main.go io.CopyBuffer has extra tests for interface like io.ReaderFrom and io.WriterTo which is not efficient in memory management from tests
func CopyEx ¶
func CopyEx(dst io.Writer, dstWriteCb SetDeadlineCallback, src io.Reader, srcReadCb SetDeadlineCallback, timeout time.Duration, sizeCallback CopiedSizeCallback) (written int64, err error)
https://github.com/efarrer/iothrottler/ https://github.com/jwkohnen/bwio/ limit copy speed / duration, read copied size
func CopyStream ¶
func CopyStream(dst io.Writer, src io.ReadCloser) chan struct{}
func CopyTimeout ¶
func CopyTimeout(dst io.Writer, dstWriteCb SetDeadlineCallback, src io.Reader, srcReadCb SetDeadlineCallback, timeout time.Duration) (written int64, err error)
Forked from standard library io.Copy
Types ¶
type CopiedSizeCallback ¶
type CopiedSizeCallback func(size int64)
type SetDeadlineCallback ¶
Click to show internal directories.
Click to hide internal directories.