net

package
v0.0.0-...-a53ac42 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeekableConn

type PeekableConn interface {
	net.Conn
	// Peek returns a preview of n bytes of the connection without consuming them.
	// Once this connection has been read from, peeking is no longer permitted and
	// will return an error.
	Peek(n int) ([]byte, error)
}

PeekableConn is an interface that is a superset of the net.Conn interface, additionally allowing a connection's bytes to be inspected without being consumed.

func NewPeekableConn

func NewPeekableConn(conn net.Conn) PeekableConn

NewPeekableConn returns a PeekableConn whose bytes can be inspected without being consumed.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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