server

package
v0.0.0-...-85804c7 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartControlServer

func StartControlServer(config *ini.File, mm *Matchmaker, relay RelayServer)

StartControlServer begins handling HTTP requests for the REST API, called by main function

Types

type Lobby

type Lobby struct {
	ID         uint64
	Name       string
	HostUserID uint64
	Password   string
}

Lobby represents a lobby hosted by a user on the proxy server.

type Matchmaker

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

Matchmaker is a structure that allows keeping track of users and lobbies.

func (*Matchmaker) Init

func (mm *Matchmaker) Init()

type RelayServer

type RelayServer interface {
	// contains filtered or unexported methods
}

Represents the relay server which handles relaying all the actual game packets from the various clients to each other

type RelayServerImpl

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

type User

type User struct {
	ID          uint64
	Address     net.Addr
	Username    string
	Linkedto    uint64
	Hosting     uint64
	LastTokenAt time.Time
}

User represents a logged in user to the proxy server. Contains info if they are hosting a game or linked to a game or neither

Jump to

Keyboard shortcuts

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