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

peek

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WrapReadWriteCloser added in v0.1.0

func WrapReadWriteCloser(r io.Reader, w io.Writer, closeFn func() error) io.ReadWriteCloser

Types

type Conn

type Conn struct {
	io.ReadWriteCloser
	Reader *bufio.Reader
}

func WrapPeekConn

func WrapPeekConn(conn io.ReadWriteCloser) *Conn

func (*Conn) LocalAddr added in v0.1.0

func (pc *Conn) LocalAddr() net.Addr

func (*Conn) Peek

func (pc *Conn) Peek(n int) ([]byte, error)

func (*Conn) Read

func (pc *Conn) Read(b []byte) (int, error)

func (*Conn) RemoteAddr added in v0.1.0

func (pc *Conn) RemoteAddr() net.Addr

func (*Conn) Write

func (pc *Conn) Write(b []byte) (int, error)

Other methods to satisfy the net.Conn interface

type ReadWriteCloser added in v0.1.0

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

func (*ReadWriteCloser) Close added in v0.1.0

func (rwc *ReadWriteCloser) Close() error

func (*ReadWriteCloser) Read added in v0.1.0

func (rwc *ReadWriteCloser) Read(p []byte) (n int, err error)

func (*ReadWriteCloser) Write added in v0.1.0

func (rwc *ReadWriteCloser) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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