bufio

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(destination io.Writer, source io.Reader) (written int64, err error)

func CopyBuffer

func CopyBuffer(destination io.Writer, source io.Reader, buffer *buf.Buffer) (written int64, err error)

func CopyConn

func CopyConn(remote net.Conn, local net.Conn) error

Types

type CachedConn

type CachedConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func NewCachedConn

func NewCachedConn(c net.Conn) *CachedConn

func (*CachedConn) Cache

func (c *CachedConn) Cache() *buf.Buffer

func (*CachedConn) Close

func (c *CachedConn) Close() error

func (*CachedConn) CurrentPosition

func (c *CachedConn) CurrentPosition() int

func (*CachedConn) Peek

func (c *CachedConn) Peek(n int) ([]byte, error)

func (*CachedConn) PeekUntil

func (c *CachedConn) PeekUntil(end ...[]byte) ([]byte, []byte, error)

func (*CachedConn) Read

func (c *CachedConn) Read(p []byte) (n int, err error)

func (*CachedConn) Release

func (c *CachedConn) Release()

func (*CachedConn) Rewind

func (c *CachedConn) Rewind(position int)

func (*CachedConn) UpstreamReader

func (c *CachedConn) UpstreamReader() io.Reader

func (*CachedConn) UpstreamWriter

func (c *CachedConn) UpstreamWriter() io.Writer

type PeekConn

type PeekConn interface {
	net.Conn
	Peek(n int) ([]byte, error)
	Rewind(position int)
	CurrentPosition() int
}

Jump to

Keyboard shortcuts

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