mux

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config *protocol.Protocol_Mux) point.WrapProxy

func NewRangeSelector added in v0.3.4

func NewRangeSelector(cap int) *rangeSelector

func NewServer

func NewServer(config *listener.Transport_Mux) func(netapi.Listener) (netapi.Listener, error)

Types

type IdleSession

type IdleSession struct {
	*yamux.Session
	// contains filtered or unexported fields
}

func NewIdleSession

func NewIdleSession(session *yamux.Session, IdleTimeout time.Duration) *IdleSession

func (*IdleSession) IsClosed added in v0.3.4

func (i *IdleSession) IsClosed() bool

func (*IdleSession) Open

func (i *IdleSession) Open(ctx context.Context) (net.Conn, error)

func (*IdleSession) OpenStream

func (i *IdleSession) OpenStream(ctx context.Context) (*yamux.Stream, error)

type MuxAddr

type MuxAddr struct {
	Addr net.Addr
	ID   uint32
}

func (*MuxAddr) Network

func (q *MuxAddr) Network() string

func (*MuxAddr) String

func (q *MuxAddr) String() string

type MuxClient

type MuxClient struct {
	netapi.Proxy
	// contains filtered or unexported fields
}

func (*MuxClient) Conn

func (m *MuxClient) Conn(ctx context.Context, addr netapi.Address) (net.Conn, error)

type MuxConn

type MuxConn interface {
	net.Conn
	StreamID() uint32
}

type MuxServer

type MuxServer struct {
	net.Listener
	// contains filtered or unexported fields
}

func (*MuxServer) Accept

func (m *MuxServer) Accept() (net.Conn, error)

func (*MuxServer) Close

func (m *MuxServer) Close() error

func (*MuxServer) Run

func (m *MuxServer) Run() error

Jump to

Keyboard shortcuts

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