Documentation
¶
Overview ¶
Package tunnel contains helpers for a traffic tunneling implementation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReaderSenderLoop ¶
func ReaderSenderLoop( ctx context.Context, r io.Reader, sendFunc func(buf []byte) error, connClosed <-chan struct{}, logger logging.Logger, ) (retErr error)
ReaderSenderLoop implements a loop that reads bytes from the reader passed in and sends those bytes using sendFunc. The loop will exit for any error received or if the context errors.
func RecvWriterLoop ¶
func RecvWriterLoop( ctx context.Context, recvFunc func() ([]byte, error), w io.Writer, rsDone <-chan struct{}, logger logging.Logger, ) (retErr error)
RecvWriterLoop implements a loop that receives bytes using recvFunc and writes those bytes to the writer. The loop will exit for any error received or if the context errors.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.