Help us shape the future of Go! Take the 2026 Go Developer Survey

pipe

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: GPL-2.0 Imports: 7 Imported by: 21

README

pipe

mod from go1.21.4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pipe

func Pipe() (net.Conn, net.Conn)

Pipe creates a synchronous, in-memory, full duplex network connection; both ends implement the Conn interface. Reads on one end are matched with writes on the other, copying data directly between the two; there is no internal buffering.

Types

type Deadline added in v0.5.0

type Deadline struct {
	// contains filtered or unexported fields
}

Deadline is an abstraction for handling timeouts.

func MakeDeadline added in v0.5.0

func MakeDeadline() Deadline

func (*Deadline) Set added in v0.5.0

func (d *Deadline) Set(t time.Time)

Set sets the point in time when the deadline will time out. A timeout event is signaled by closing the channel returned by waiter. Once a timeout has occurred, the deadline can be refreshed by specifying a t value in the future.

A zero value for t prevents timeout.

func (*Deadline) Wait added in v0.5.0

func (d *Deadline) Wait() chan struct{}

Wait returns a channel that is closed when the deadline is exceeded.

Jump to

Keyboard shortcuts

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