pipe

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pipe provides a function that creates two paired in-memory net connections: objects that implements the `net.Conn` interface.

The standard library `net.Pipe() (c1, c2 net.Conn)` function creates two in-memory paired connections, which will return a not-implemented error up on SetDeadline, SetReadDeadline or SetWriteDeadline calls. This functionality is sometimes needed, and it is provided by this package pipe implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(log Println) (c1, c2 net.Conn)

New creates a new pipe. log is a log.Println-like function that can be set for debugging the connection. It can be set to nil if no debug is needed.

Types

type Println

type Println func(...interface{})

Println is a log.Println-like function that can be used for debug purposes.

func (Println) Println

func (p Println) Println(arg ...interface{})

Println logs if not nil

Jump to

Keyboard shortcuts

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