rio

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBuffer

func CopyBuffer(dst io.Writer, src io.Reader, wch chan int64) (err error)

borrowed from the official go io package with some changes to support throughput metrics

func CopyConn

func CopyConn(c1 io.ReadWriteCloser, c2 io.ReadWriteCloser)

CopyConn copy packets from c1 to c2 and viceversa

func CopyConnWithOnClose

func CopyConnWithOnClose(
	c1 io.ReadWriteCloser,
	c2 io.ReadWriteCloser,
	metrics bool,
	onClose func()) chan int64

CopyConnWithOnClose copy packets from c1 to c2 and viceversa. Calls the onClose function when the connection is interrupted

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL