GitHubCommencer

La référence API provient des commentaires de documentation Go du code source et est rédigée en anglais.

package lan

import "github.com/nsgo-dev/game/pkg/online/lan"

Vue d’ensemble

Package lan is experimental: its API and documented formats may change in a minor release. See the API stability policy. describes multiplayer games advertised on the local network, with the validation and deterministic TXT metadata a discovery protocol such as mDNS carries.

Index

Types

type Game struct {
	Name, Type, Address, Version string
	Port                         int
	Players, Capacity            int
	Password                     bool
	Info                         map[string]string
}

Game describes a discovered LAN game advertisement.

func (g Game) TXT() map[string]string

TXT returns deterministic discovery metadata.

func (g Game) Validate() error

Validate checks a game advertisement.