Versions in this module Expand all Collapse all v0 v0.2.0 May 14, 2024 Changes in this version + var MulticastGroup = net.UDPAddr + var TypeCacheFlush uint16 = 1 << 15 + var TypeUnicastResponse uint16 = 1 << 15 + func FindGame(ctx context.Context, gv w3gs.GameVersion) (addr string, hostCounter uint32, entryKey uint32, err error) + type Advertiser interface + Close func() error + Create func() error + Decreate func() error + Refresh func(slotsUsed uint32, slotsAvailable uint32) error + Run func() error + func NewAdvertiser(info *w3gs.GameInfo) (Advertiser, error) + type DNSPacketConn struct + func NewDNSPacketConn(conn net.PacketConn) *DNSPacketConn + func (c *DNSPacketConn) Broadcast(pkt *dns.Msg) (int, error) + func (c *DNSPacketConn) Close() error + func (c *DNSPacketConn) Conn() net.PacketConn + func (c *DNSPacketConn) NextPacket(timeout time.Duration) (*dns.Msg, net.Addr, error) + func (c *DNSPacketConn) Run(f network.Emitter, timeout time.Duration) error + func (c *DNSPacketConn) Send(addr net.Addr, pkt *dns.Msg) (int, error) + func (c *DNSPacketConn) SetConn(conn net.PacketConn) + func (c *DNSPacketConn) SetWriteTimeout(wto time.Duration) + type GameList interface + Close func() error + Games func() map[string]w3gs.GameInfo + Run func() error + func NewGameList(gv w3gs.GameVersion) (GameList, error) + type MDNSAdvertiser struct + BroadcastInterval time.Duration + func NewMDNSAdvertiser(info *w3gs.GameInfo) (*MDNSAdvertiser, error) + func (a *MDNSAdvertiser) Close() error + func (a *MDNSAdvertiser) Create() error + func (a *MDNSAdvertiser) Decreate() error + func (a *MDNSAdvertiser) InitDefaultHandlers() + func (a *MDNSAdvertiser) Refresh(slotsUsed uint32, slotsAvailable uint32) error + func (a *MDNSAdvertiser) Run() error + type MDNSGameList struct + BroadcastInterval time.Duration + GameVersion w3gs.GameVersion + func NewMDNSGameList(gv w3gs.GameVersion) (*MDNSGameList, error) + func (g *MDNSGameList) Games() map[string]w3gs.GameInfo + func (g *MDNSGameList) InitDefaultHandlers() + func (g *MDNSGameList) Run() error + type UDPAdvertiser struct + BroadcastInterval time.Duration + func NewUDPAdvertiser(info *w3gs.GameInfo, port int) (*UDPAdvertiser, error) + func (a *UDPAdvertiser) Close() error + func (a *UDPAdvertiser) Create() error + func (a *UDPAdvertiser) Decreate() error + func (a *UDPAdvertiser) InitDefaultHandlers() + func (a *UDPAdvertiser) Refresh(slotsUsed uint32, slotsAvailable uint32) error + func (a *UDPAdvertiser) Run() error + type UDPGameList struct + BroadcastInterval time.Duration + GameVersion w3gs.GameVersion + func NewUDPGameList(gv w3gs.GameVersion, port int) (*UDPGameList, error) + func (g *UDPGameList) Encoding() w3gs.Encoding + func (g *UDPGameList) Games() map[string]w3gs.GameInfo + func (g *UDPGameList) InitDefaultHandlers() + func (g *UDPGameList) Run() error + type Update struct