udpmux

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Muxer

type Muxer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMuxer

func NewMuxer(d i.IPResolver) *Muxer

func (*Muxer) Handle

func (m *Muxer) Handle(ctx context.Context, udpUuid uuid.UUID, dest net.AddressPort,
	rw buf.ReaderWriter, dialPacket func(ctx context.Context) (MyPacketConn, error)) error

Returns when an error occurs or ctx is done.

type MyPacketConn

type MyPacketConn interface {
	ReadFrom(p []byte) (n int, addr net.Addr, err error)
	WriteTo(p []byte, addr net.Addr) (n int, err error)
	Close() error
}

Jump to

Keyboard shortcuts

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