OpenTTD Source: NetworkGame Struct Reference

OpenTTD Source 15.0-RC2

Public Member Functions | Data Fields
NetworkGame Struct Reference

Structure with information shown in the game list (GUI) More...

`#include <network_gamelist.h>`

## Public Member Functions
| NetworkGame (std::string_view connection_string)

## Data Fields
NetworkGameInfo | info {}
| The game information of this server.
std::string | connection_string
| Address of the server.
NetworkGameStatus | status = NGLS_OFFLINE
| Stats of the server.
bool | manually = false
| True if the server was added manually.
bool | refreshing = false
| Whether this server is being queried.
int | version = 0
| Used to see which servers are no longer available on the Game Coordinator and can be removed.

## Detailed Description

Structure with information shown in the game list (GUI)

Definition at line 27 of file network_gamelist.h.

## Constructor & Destructor Documentation

## ◆ NetworkGame()

NetworkGame::NetworkGame | ( | std::string_view | connection_string | ) |
| inline

Definition at line 28 of file network_gamelist.h.

## Field Documentation

## ◆ connection_string

std::string NetworkGame::connection_string

Address of the server.

Definition at line 31 of file network_gamelist.h.

Referenced by NetworkGameListAddItem(), NetworkGameWindow::NGameNameSorter(), and NetworkGameWindow::OnClick().

## ◆ info

NetworkGameInfo NetworkGame::info {}

The game information of this server.

Definition at line 30 of file network_gamelist.h.

Referenced by NetworkGameWindow::DrawServerLine(), NetworkAddServer(), NetworkGameWindow::NGameAllowedSorter(), NetworkGameWindow::NGameCalendarDateSorter(), NetworkGameWindow::NGameClientSorter(), NetworkGameWindow::NGameMapSizeSorter(), NetworkGameWindow::NGameNameSorter(), NetworkGameWindow::NGameTicksPlayingSorter(), NetworkGameWindow::OnClick(), NetworkGameWindow::OnPaint(), ClientNetworkCoordinatorSocketHandler::Receive_GC_LISTING(), and QueryNetworkGameSocketHandler::Receive_SERVER_GAME_INFO().

## ◆ manually

bool NetworkGame::manually = false

True if the server was added manually.

Definition at line 33 of file network_gamelist.h.

Referenced by NetworkAddServer().

## ◆ refreshing

bool NetworkGame::refreshing = false

Whether this server is being queried.

Definition at line 34 of file network_gamelist.h.

Referenced by QueryNetworkGameSocketHandler::CloseConnection(), NetworkQueryServer(), NetworkGameWindow::OnClick(), TCPQueryConnecter::OnFailure(), NetworkGameWindow::OnPaint(), QueryNetworkGameSocketHandler::Receive_SERVER_BANNED(), QueryNetworkGameSocketHandler::Receive_SERVER_ERROR(), QueryNetworkGameSocketHandler::Receive_SERVER_FULL(), and QueryNetworkGameSocketHandler::Receive_SERVER_GAME_INFO().

## ◆ status

NetworkGameStatus NetworkGame::status = NGLS_OFFLINE

Stats of the server.

Definition at line 32 of file network_gamelist.h.

Referenced by QueryNetworkGameSocketHandler::CloseConnection(), NetworkGameWindow::DrawServerLine(), TCPQueryConnecter::OnFailure(), NetworkGameWindow::OnPaint(), ClientNetworkCoordinatorSocketHandler::Receive_GC_ERROR(), ClientNetworkCoordinatorSocketHandler::Receive_GC_LISTING(), QueryNetworkGameSocketHandler::Receive_SERVER_BANNED(), QueryNetworkGameSocketHandler::Receive_SERVER_ERROR(), QueryNetworkGameSocketHandler::Receive_SERVER_FULL(), and QueryNetworkGameSocketHandler::Receive_SERVER_GAME_INFO().

## ◆ version

int NetworkGame::version = 0

Used to see which servers are no longer available on the Game Coordinator and can be removed.

Definition at line 35 of file network_gamelist.h.

Referenced by NetworkAddServer(), and ClientNetworkCoordinatorSocketHandler::Receive_GC_LISTING().

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

- src/network/network_gamelist.h