mio

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClosedByRemote    error = errors.Join(net.ErrClosed, errors.New("closed by remote"))
	ErrMainConnClosed    error = errors.Join(net.ErrClosed, errors.New("main conn closed"))
	ErrDialingIsCanceled error = errors.New("dial is canceled")
	ErrReadBufIsFull     error = errors.New("read buf is full")
)

Functions

func New

func New(c net.Conn) (m *conn)

Types

type Conn

type Conn interface {
	koNet.ContextDialer
	koNet.Listener
	Done() <-chan struct{}
	SubConns() map[uint16]SubConn
	LocalAddr() net.Addr
	RemoteAddr() net.Addr
	KeepAlive(duration time.Duration)
	Latency() time.Duration
}

Multi-connections in one connection. A pipeListener on net.Conn.

type SubConn

type SubConn interface {
	Id() uint16
	LocalAddr() net.Addr
	RemoteAddr() net.Addr
}

Jump to

Keyboard shortcuts

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