lobbyserver

package
v0.0.0-...-a149600 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Accepted        = 0
	BadPassword     = 1
	MismatchVersion = 2
	RoomFull        = 3
	DuplicateName   = 4
	RoomDeleted     = 5
	BadName         = 6
	BadEmulator     = 7
	BadAuth         = 8
	Other           = 9
)
View Source
const (
	TypeRequestPlayers     = "request_players"
	TypeReplyPlayers       = "reply_players"
	TypeRequestGetRooms    = "request_get_rooms"
	TypeReplyGetRooms      = "reply_get_rooms"
	TypeRequestCreateRoom  = "request_create_room"
	TypeReplyCreateRoom    = "reply_create_room"
	TypeRequestJoinRoom    = "request_join_room"
	TypeReplyJoinRoom      = "reply_join_room"
	TypeRequestChatMessage = "request_chat_message"
	TypeReplyChatMessage   = "reply_chat_message"
	TypeRequestBeginGame   = "request_begin_game"
	TypeReplyBeginGame     = "reply_begin_game"
	TypeRequestMotd        = "request_motd"
	TypeReplyMotd          = "reply_motd"
	TypeRequestVersion     = "request_version"
	TypeReplyVersion       = "reply_version"
)
View Source
const NetplayAPIVersion = 16

Variables

This section is empty.

Functions

This section is empty.

Types

type LobbyServer

type LobbyServer struct {
	GameServers      map[string]*gameserver.GameServer
	Logger           logr.Logger
	Name             string
	Motd             string
	BasePort         int
	MaxGames         int
	DisableBroadcast bool
	EnableAuth       bool
}

func (*LobbyServer) LogServerStats

func (s *LobbyServer) LogServerStats()

func (*LobbyServer) RunSocketServer

func (s *LobbyServer) RunSocketServer(broadcastPort int) error

type SocketMessage

type SocketMessage struct {
	Features       map[string]string `json:"features,omitempty"`
	GameName       string            `json:"game_name,omitempty"`
	Protected      bool              `json:"protected"`
	Password       string            `json:"password"`
	Message        string            `json:"message,omitempty"`
	ClientSha      string            `json:"client_sha,omitempty"`
	Emulator       string            `json:"emulator,omitempty"`
	PlayerName     string            `json:"player_name"`
	RoomName       string            `json:"room_name"`
	MD5            string            `json:"MD5,omitempty"`
	AuthTime       string            `json:"authTime,omitempty"`
	Type           string            `json:"type"`
	Auth           string            `json:"auth,omitempty"`
	PlayerNames    []string          `json:"player_names,omitempty"`
	Accept         int               `json:"accept"`
	NetplayVersion int               `json:"netplay_version,omitempty"`
	Port           int               `json:"port"`
}

Jump to

Keyboard shortcuts

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