TNet 3  3.0.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
TNet.ServerList Class Reference

Server list is a helper class containing a list of servers. More...

Classes

class  Entry
 

Public Member Functions

void SortByPlayers ()
 Sort the server list, arranging it by the number of players. More...
 
void SortAlphabetic ()
 Sort the server list, arranging entries alphabetically. More...
 
Entry Add (string name, int playerCount, IPEndPoint internalAddress, IPEndPoint externalAddress, long time)
 Add a new entry to the list. More...
 
Entry Add (Entry newEntry, long time)
 Add a new entry. More...
 
Entry Remove (IPEndPoint internalAddress, IPEndPoint externalAddress)
 Remove an existing entry from the list. More...
 
bool Cleanup (long time)
 Remove expired entries. More...
 
void Clear ()
 Clear the list of servers. More...
 
void WriteTo (BinaryWriter writer)
 Save the list of servers to the specified binary writer. More...
 
void ReadFrom (BinaryReader reader, long time)
 Read a list of servers from the binary reader. More...
 

Public Attributes

List< Entrylist = new List<Entry>()
 List of active server entries. Be sure to lock it before using it, as it can be changed from a different thread. More...
 

Detailed Description

Server list is a helper class containing a list of servers.

Member Function Documentation

Entry TNet.ServerList.Add ( string  name,
int  playerCount,
IPEndPoint  internalAddress,
IPEndPoint  externalAddress,
long  time 
)

Add a new entry to the list.

Entry TNet.ServerList.Add ( Entry  newEntry,
long  time 
)

Add a new entry.

bool TNet.ServerList.Cleanup ( long  time)

Remove expired entries.

void TNet.ServerList.Clear ( )

Clear the list of servers.

void TNet.ServerList.ReadFrom ( BinaryReader  reader,
long  time 
)

Read a list of servers from the binary reader.

Entry TNet.ServerList.Remove ( IPEndPoint  internalAddress,
IPEndPoint  externalAddress 
)

Remove an existing entry from the list.

void TNet.ServerList.SortAlphabetic ( )

Sort the server list, arranging entries alphabetically.

void TNet.ServerList.SortByPlayers ( )

Sort the server list, arranging it by the number of players.

void TNet.ServerList.WriteTo ( BinaryWriter  writer)

Save the list of servers to the specified binary writer.

Member Data Documentation

List<Entry> TNet.ServerList.list = new List<Entry>()

List of active server entries. Be sure to lock it before using it, as it can be changed from a different thread.


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