udpmux

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEndPointExists = errors.New("endpoint already exists")
)

Functions

This section is empty.

Types

type EndPoint

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

func (*EndPoint) Close

func (p *EndPoint) Close()

func (*EndPoint) OnRead

func (p *EndPoint) OnRead(handler func(data []byte))

func (*EndPoint) RemoteAddr

func (p *EndPoint) RemoteAddr() string

func (*EndPoint) Write

func (p *EndPoint) Write(buf []byte) (int, error)

type UdpMux

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

func NewUdpMux

func NewUdpMux(network string, ip string, port uint16) (*UdpMux, error)

func (*UdpMux) AddEndPoint

func (p *UdpMux) AddEndPoint(ip string, port uint16) (*EndPoint, error)

func (*UdpMux) Close

func (p *UdpMux) Close() error

func (*UdpMux) IP

func (p *UdpMux) IP() string

func (*UdpMux) Port

func (p *UdpMux) Port() uint16

Jump to

Keyboard shortcuts

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