pipe

package
v0.0.0-...-c5474ca Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pipe implements a nonblocking Reader/Writer pair; data can be written to the writer end of the pipe and read from the reader end of the pipe. This is similar to io.Pipe() with some differences: first, we implement the ipx.ReadWriteCloser interface. Second, calls to WritePacket() never block. Third, there is an internal buffer of packets that have been written but not yet read from the pipe. The size of the buffer is configurable. Once the buffer is full, WritePacket() will return errors until the reader drains the pipe.

Index

Constants

This section is empty.

Variables

View Source
var (
	PipeFullError = errors.New("pipe buffer is full")
)

Functions

func New

func New() *pipe

New returns a new pipe that buffers a number of writes internally. This is conceptually similar to io.Pipe(), but for IPX packets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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