udpbroadcast

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	sync.Mutex
	// contains filtered or unexported fields
}

type UDPBroadcast

type UDPBroadcast struct {
	sync.RWMutex

	TimeoutInterval      time.Duration
	ReceiveHandler       func(client interface{}, buf []byte)
	AllowDynamicNewPeers bool
	// contains filtered or unexported fields
}

func NewUDPBroadcast

func NewUDPBroadcast() (*UDPBroadcast, error)

func (*UDPBroadcast) AddPeer

func (u *UDPBroadcast) AddPeer(addr *net.UDPAddr, timeout time.Duration) *Client

func (*UDPBroadcast) ListenAndServe

func (u *UDPBroadcast) ListenAndServe(addr string) error

func (*UDPBroadcast) Send

func (u *UDPBroadcast) Send(skip interface{}, buf []byte) error

func (*UDPBroadcast) Shutdown

func (u *UDPBroadcast) Shutdown() error

Jump to

Keyboard shortcuts

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