stubs

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyConn

type DummyConn struct{}

DummyConn reads and writes no data.

func NewDummyConn

func NewDummyConn() *DummyConn

NewDummyConn creates a new DummyConn.

func (*DummyConn) Close

func (*DummyConn) Close() error

func (*DummyConn) LocalAddr

func (*DummyConn) LocalAddr() net.Addr

func (*DummyConn) Read

func (*DummyConn) Read([]byte) (int, error)

func (*DummyConn) RemoteAddr

func (*DummyConn) RemoteAddr() net.Addr

func (*DummyConn) SetDeadline

func (*DummyConn) SetDeadline(time.Time) error

func (*DummyConn) SetReadDeadline

func (*DummyConn) SetReadDeadline(time.Time) error

func (*DummyConn) SetWriteDeadline

func (*DummyConn) SetWriteDeadline(time.Time) error

func (*DummyConn) Write

func (*DummyConn) Write([]byte) (int, error)

type IdleListener

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

IdleListener opens a number of idle connections and then closes them one by one after a delay.

func NewIdleListener

func NewIdleListener(numConns int, idleTime time.Duration) *IdleListener

NewIdleListener creates a new IdleListener with the specified number of active connections and time delay.

func (*IdleListener) Accept

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

func (*IdleListener) Addr

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

func (*IdleListener) Close

func (l *IdleListener) Close() error

func (*IdleListener) OpenConns

func (l *IdleListener) OpenConns() int

Jump to

Keyboard shortcuts

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