connpeeker

package
v0.0.0-...-c8b0a90 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeListener

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

func NewFakeListener

func NewFakeListener() *FakeListener

func (*FakeListener) Accept

func (l *FakeListener) Accept() (net.Conn, error)

func (*FakeListener) Addr

func (l *FakeListener) Addr() net.Addr

Addr returns the listener's network address.

func (*FakeListener) Close

func (l *FakeListener) Close() error

Close closes the listener. Any blocked Accept operations will be unblocked and return errors.

func (*FakeListener) ServeConn

func (l *FakeListener) ServeConn(conn net.Conn) error

type PeekTCPConn

type PeekTCPConn struct {
	Conn       *net.TCPConn
	ReadBuffer []byte
}

func (*PeekTCPConn) Close

func (c *PeekTCPConn) Close() error

func (*PeekTCPConn) CloseRead

func (c *PeekTCPConn) CloseRead() error

func (*PeekTCPConn) CloseWrite

func (c *PeekTCPConn) CloseWrite() error

func (*PeekTCPConn) LocalAddr

func (c *PeekTCPConn) LocalAddr() net.Addr

func (*PeekTCPConn) Peek

func (c *PeekTCPConn) Peek(num int) error

fill up to @num bytes into ReadBuffer (appending to existing data) @num limits the total number of bytes in ReadBuffer, not the new data

func (*PeekTCPConn) Read

func (c *PeekTCPConn) Read(b []byte) (int, error)

func (*PeekTCPConn) ReadFrom

func (c *PeekTCPConn) ReadFrom(r io.Reader) (int64, error)

func (*PeekTCPConn) RemoteAddr

func (c *PeekTCPConn) RemoteAddr() net.Addr

func (*PeekTCPConn) SetDeadline

func (c *PeekTCPConn) SetDeadline(t time.Time) error

func (*PeekTCPConn) SetKeepAlive

func (c *PeekTCPConn) SetKeepAlive(keepalive bool) error

func (*PeekTCPConn) SetKeepAlivePeriod

func (c *PeekTCPConn) SetKeepAlivePeriod(d time.Duration) error

func (*PeekTCPConn) SetLinger

func (c *PeekTCPConn) SetLinger(sec int) error

func (*PeekTCPConn) SetNoDelay

func (c *PeekTCPConn) SetNoDelay(noDelay bool) error

func (*PeekTCPConn) SetReadBuffer

func (c *PeekTCPConn) SetReadBuffer(bytes int) error

func (*PeekTCPConn) SetReadDeadline

func (c *PeekTCPConn) SetReadDeadline(t time.Time) error

func (*PeekTCPConn) SetWriteBuffer

func (c *PeekTCPConn) SetWriteBuffer(bytes int) error

func (*PeekTCPConn) SetWriteDeadline

func (c *PeekTCPConn) SetWriteDeadline(t time.Time) error

func (*PeekTCPConn) Write

func (c *PeekTCPConn) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

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