FirstModulAR 0.1.0
Loading...
Searching...
No Matches
FMAR.Networking.ServerManager Class Reference

Manages the server list and saves it to a file for persistence across sessions. More...

Inheritance diagram for FMAR.Networking.ServerManager:

Public Member Functions

void AddServer (string name, string ip)
 Add a server to the list with the given name and IP address.
 
void RemoveServer (string name)
 Remove a server matching the given name from the list.
 
Server GetServer (string name)
 Get a server matching the given name from the list.
 
List< ServerGetAllServers ()
 Get all servers in the list.
 
void SaveServersToFile ()
 Save the server list to a file.
 
void LoadServersFromFile ()
 Load the server list from a file.
 

Properties

static ServerManager Instance [get]
 
static Server[] Servers [get]
 Get the servers in the list.
 

Events

static Action< Server[]> OnServerListLoaded
 Event invoked when the server list is loaded from the file.
 

Detailed Description

Manages the server list and saves it to a file for persistence across sessions.

Member Function Documentation

◆ AddServer()

void FMAR.Networking.ServerManager.AddServer ( string name,
string ip )
inline

Add a server to the list with the given name and IP address.

Parameters
nameThe name of the server.
ipThe IP address of the server.

◆ GetAllServers()

List< Server > FMAR.Networking.ServerManager.GetAllServers ( )
inline

Get all servers in the list.

Returns
The list of servers.

◆ GetServer()

Server FMAR.Networking.ServerManager.GetServer ( string name)
inline

Get a server matching the given name from the list.

Parameters
nameThe name of the server.
Returns
The server with the given name.

◆ LoadServersFromFile()

void FMAR.Networking.ServerManager.LoadServersFromFile ( )
inline

Load the server list from a file.

◆ RemoveServer()

void FMAR.Networking.ServerManager.RemoveServer ( string name)
inline

Remove a server matching the given name from the list.

Parameters
nameThe name of the server.

◆ SaveServersToFile()

void FMAR.Networking.ServerManager.SaveServersToFile ( )
inline

Save the server list to a file.

Property Documentation

◆ Instance

ServerManager FMAR.Networking.ServerManager.Instance
staticget

◆ Servers

Server [] FMAR.Networking.ServerManager.Servers
staticget

Get the servers in the list.

Event Documentation

◆ OnServerListLoaded

Action<Server[]> FMAR.Networking.ServerManager.OnServerListLoaded
static

Event invoked when the server list is loaded from the file.


The documentation for this class was generated from the following file: