OpenTTD Source: NetworkSettings Struct Reference

OpenTTD Source 15.0-beta1

Public Member Functions | Data Fields
NetworkSettings Struct Reference

All settings related to the network. More...

`#include <settings_type.h>`

## Public Member Functions
bool | AdminAuthenticationConfigured () const

## Data Fields
uint16_t | sync_freq
| how often do we check whether we are still in-sync
uint8_t | frame_freq
| how often do we send commands to the clients
uint16_t | commands_per_frame
| how many commands may be sent each frame_freq frames?
uint16_t | commands_per_frame_server
| how many commands may be sent each frame_freq frames? (server-originating commands)
uint16_t | max_commands_in_queue
| how many commands may there be in the incoming queue before dropping the connection?
uint16_t | bytes_per_frame
| how many bytes may, over a long period, be received per frame?
uint16_t | bytes_per_frame_burst
| how many bytes may, over a short period, be received?
uint16_t | max_init_time
| maximum amount of time, in game ticks, a client may take to initiate joining
uint16_t | max_join_time
| maximum amount of time, in game ticks, a client may take to sync up during joining
uint16_t | max_download_time
| maximum amount of time, in game ticks, a client may take to download the map
uint16_t | max_password_time
| maximum amount of time, in game ticks, a client may take to enter the password
uint16_t | max_lag_time
| maximum amount of time, in game ticks, a client may be lagging behind the server
bool | pause_on_join
| pause the game when people join
uint16_t | server_port
| port the server listens on
uint16_t | server_admin_port
| port the server listens on for the admin network
bool | server_admin_chat
| allow private chat for the server to be distributed to the admin network
ServerGameType | server_game_type
| Server type: local / public / invite-only.
std::string | server_invite_code
| Invite code to use when registering as server.
std::string | server_invite_code_secret
| Secret to proof we got this invite code from the Game Coordinator.
std::string | server_name
| name of the server
std::string | server_password
| password for joining this server
NetworkAuthorizedKeys | server_authorized_keys
| Public keys of clients that are authorized to connect to the game.
std::string | rcon_password
| password for rconsole (server side)
NetworkAuthorizedKeys | rcon_authorized_keys
| Public keys of clients that are authorized to use the rconsole (server side).
bool | allow_insecure_admin_login
| Whether to allow logging in as admin using the insecure old JOIN packet.
std::string | admin_password
| password for the admin network
NetworkAuthorizedKeys | admin_authorized_keys
| Public keys of clients that are authorized to use the admin network.
std::string | client_name
| name of the player (as client)
std::string | client_secret_key
| The secret key of the client for authorized key logins.
std::string | client_public_key
| The public key of the client for authorized key logins.
std::string | connect_to_ip
| default for the "Add server" query
bool | autoclean_companies
| automatically remove companies that are not in use
uint8_t | autoclean_protected
| Remove companies after this many months.
uint8_t | autoclean_novehicles
| remove companies with no vehicles after this many months
uint8_t | max_companies
| maximum amount of companies
uint8_t | max_clients
| maximum amount of clients
TimerGameCalendar::Year | restart_game_year
| year the server restarts
uint16_t | restart_hours
| number of hours to run the server before automatic restart
uint8_t | min_active_clients
| minimum amount of active clients to unpause the game
bool | reload_cfg
| reload the config file before restarting
std::string | last_joined
| Last joined server.
UseRelayService | use_relay_service
| Use relay service?
ParticipateSurvey | participate_survey
| Participate in the automated survey.

## Detailed Description

All settings related to the network.

Definition at line 302 of file settings_type.h.

## Member Function Documentation

## ◆ AdminAuthenticationConfigured()

bool NetworkSettings::AdminAuthenticationConfigured | ( |  | ) | const
| inline

Definition at line 347 of file settings_type.h.

## Field Documentation

## ◆ admin_authorized_keys

NetworkAuthorizedKeys NetworkSettings::admin_authorized_keys

Public keys of clients that are authorized to use the admin network.

Definition at line 329 of file settings_type.h.

## ◆ admin_password

std::string NetworkSettings::admin_password

password for the admin network

Definition at line 328 of file settings_type.h.

Referenced by ServerNetworkAdminSocketHandler::Receive_ADMIN_JOIN().

## ◆ allow_insecure_admin_login

bool NetworkSettings::allow_insecure_admin_login

Whether to allow logging in as admin using the insecure old JOIN packet.

Definition at line 327 of file settings_type.h.

Referenced by ServerNetworkAdminSocketHandler::Receive_ADMIN_JOIN().

## ◆ autoclean_companies

bool NetworkSettings::autoclean_companies

automatically remove companies that are not in use

Definition at line 334 of file settings_type.h.

Referenced by NetworkAutoCleanCompanies().

## ◆ autoclean_novehicles

uint8_t NetworkSettings::autoclean_novehicles

remove companies with no vehicles after this many months

Definition at line 336 of file settings_type.h.

Referenced by NetworkAutoCleanCompanies().

## ◆ autoclean_protected

uint8_t NetworkSettings::autoclean_protected

Remove companies after this many months.

Definition at line 335 of file settings_type.h.

Referenced by NetworkAutoCleanCompanies().

## ◆ bytes_per_frame

uint16_t NetworkSettings::bytes_per_frame

how many bytes may, over a long period, be received per frame?

Definition at line 308 of file settings_type.h.

Referenced by NetworkServer_Tick().

## ◆ bytes_per_frame_burst

uint16_t NetworkSettings::bytes_per_frame_burst

how many bytes may, over a short period, be received?

Definition at line 309 of file settings_type.h.

Referenced by NetworkServer_Tick(), and ServerNetworkGameSocketHandler::ServerNetworkGameSocketHandler().

## ◆ client_name

std::string NetworkSettings::client_name

name of the player (as client)

Definition at line 330 of file settings_type.h.

Referenced by CheckClientAndServerName(), NetworkValidateOurClientName(), NetworkClientListWindow::OnClick(), NetworkGameWindow::OnEditboxChanged(), NetworkClientListWindow::SetStringParameters(), and NetworkClientListWindow::UpdateWidgetSize().

## ◆ client_public_key

std::string NetworkSettings::client_public_key

The public key of the client for authorized key logins.

Definition at line 332 of file settings_type.h.

Referenced by ClientNetworkGameSocketHandler::Receive_SERVER_AUTH_REQUEST().

## ◆ client_secret_key

std::string NetworkSettings::client_secret_key

The secret key of the client for authorized key logins.

Definition at line 331 of file settings_type.h.

Referenced by ClientNetworkGameSocketHandler::Receive_SERVER_AUTH_REQUEST().

## ◆ commands_per_frame

uint16_t NetworkSettings::commands_per_frame

how many commands may be sent each frame_freq frames?

Definition at line 305 of file settings_type.h.

Referenced by DistributeQueue().

## ◆ commands_per_frame_server

uint16_t NetworkSettings::commands_per_frame_server

how many commands may be sent each frame_freq frames? (server-originating commands)

Definition at line 306 of file settings_type.h.

Referenced by DistributeQueue().

## ◆ connect_to_ip

std::string NetworkSettings::connect_to_ip

default for the "Add server" query

Definition at line 333 of file settings_type.h.

Referenced by NetworkGameWindow::OnClick(), and NetworkGameWindow::OnQueryTextFinished().

## ◆ frame_freq

uint8_t NetworkSettings::frame_freq

how often do we send commands to the clients

Definition at line 304 of file settings_type.h.

## ◆ last_joined

std::string NetworkSettings::last_joined

Last joined server.

Definition at line 343 of file settings_type.h.

Referenced by NetworkClientJoinGame().

## ◆ max_clients

uint8_t NetworkSettings::max_clients

maximum amount of clients

Definition at line 338 of file settings_type.h.

Referenced by NetworkStartServerWindow::OnClick(), NetworkStartServerWindow::OnQueryTextFinished(), ServerNetworkGameSocketHandler::Receive_CLIENT_JOIN(), and NetworkStartServerWindow::SetStringParameters().

## ◆ max_commands_in_queue

uint16_t NetworkSettings::max_commands_in_queue

how many commands may there be in the incoming queue before dropping the connection?

Definition at line 307 of file settings_type.h.

Referenced by ServerNetworkGameSocketHandler::Receive_CLIENT_COMMAND().

## ◆ max_companies

uint8_t NetworkSettings::max_companies

maximum amount of companies

Definition at line 337 of file settings_type.h.

Referenced by NetworkMaxCompaniesAllowed(), NetworkStartServerWindow::OnClick(), NetworkStartServerWindow::OnQueryTextFinished(), OnTick_Companies(), ServerNetworkGameSocketHandler::Receive_CLIENT_COMMAND(), ServerNetworkGameSocketHandler::Receive_CLIENT_IDENTIFY(), ServerNetworkGameSocketHandler::SendConfigUpdate(), and NetworkStartServerWindow::SetStringParameters().

## ◆ max_download_time

uint16_t NetworkSettings::max_download_time

maximum amount of time, in game ticks, a client may take to download the map

Definition at line 312 of file settings_type.h.

Referenced by NetworkServer_Tick().

## ◆ max_init_time

uint16_t NetworkSettings::max_init_time

maximum amount of time, in game ticks, a client may take to initiate joining

Definition at line 310 of file settings_type.h.

Referenced by NetworkServer_Tick().

## ◆ max_join_time

uint16_t NetworkSettings::max_join_time

maximum amount of time, in game ticks, a client may take to sync up during joining

Definition at line 311 of file settings_type.h.

Referenced by NetworkServer_Tick().

## ◆ max_lag_time

uint16_t NetworkSettings::max_lag_time

maximum amount of time, in game ticks, a client may be lagging behind the server

Definition at line 314 of file settings_type.h.

Referenced by NetworkServer_Tick().

## ◆ max_password_time

uint16_t NetworkSettings::max_password_time

maximum amount of time, in game ticks, a client may take to enter the password

Definition at line 313 of file settings_type.h.

Referenced by NetworkServer_Tick().

## ◆ min_active_clients

uint8_t NetworkSettings::min_active_clients

minimum amount of active clients to unpause the game

Definition at line 341 of file settings_type.h.

Referenced by CheckMinActiveClients().

## ◆ participate_survey

ParticipateSurvey NetworkSettings::participate_survey

Participate in the automated survey.

Definition at line 345 of file settings_type.h.

Referenced by NetworkAskSurveyWindow::OnClick(), GameOptionsWindow::OnClick(), GameOptionsWindow::OnInvalidateData(), and NetworkSurveyHandler::Transmit().

## ◆ pause_on_join

bool NetworkSettings::pause_on_join

pause the game when people join

Definition at line 315 of file settings_type.h.

Referenced by CheckPauseOnJoin().

## ◆ rcon_authorized_keys

NetworkAuthorizedKeys NetworkSettings::rcon_authorized_keys

Public keys of clients that are authorized to use the rconsole (server side).

Definition at line 326 of file settings_type.h.

## ◆ rcon_password

std::string NetworkSettings::rcon_password

password for rconsole (server side)

Definition at line 325 of file settings_type.h.

Referenced by ServerNetworkGameSocketHandler::Receive_CLIENT_RCON().

## ◆ reload_cfg

bool NetworkSettings::reload_cfg

reload the config file before restarting

Definition at line 342 of file settings_type.h.

## ◆ restart_game_year

TimerGameCalendar::Year NetworkSettings::restart_game_year

year the server restarts

Definition at line 339 of file settings_type.h.

Referenced by NetworkCheckRestartMapYear().

## ◆ restart_hours

uint16_t NetworkSettings::restart_hours

number of hours to run the server before automatic restart

Definition at line 340 of file settings_type.h.

Referenced by ChangeNetworkRestartTime().

## ◆ server_admin_chat

bool NetworkSettings::server_admin_chat

allow private chat for the server to be distributed to the admin network

Definition at line 318 of file settings_type.h.

Referenced by NetworkServerSendChat().

## ◆ server_admin_port

uint16_t NetworkSettings::server_admin_port

port the server listens on for the admin network

Definition at line 317 of file settings_type.h.

## ◆ server_authorized_keys

NetworkAuthorizedKeys NetworkSettings::server_authorized_keys

Public keys of clients that are authorized to connect to the game.

Definition at line 324 of file settings_type.h.

## ◆ server_game_type

ServerGameType NetworkSettings::server_game_type

Server type: local / public / invite-only.

Definition at line 319 of file settings_type.h.

Referenced by LoadFromConfig(), NetworkUpdateServerGameType(), NetworkStartServerWindow::OnClick(), NetworkClientListWindow::OnClick(), NetworkStartServerWindow::OnDropdownSelect(), NetworkClientListWindow::OnDropdownSelect(), ClientNetworkCoordinatorSocketHandler::Receive_GC_ERROR(), ClientNetworkCoordinatorSocketHandler::Receive_GC_REGISTER_ACK(), ClientNetworkCoordinatorSocketHandler::Register(), ClientNetworkCoordinatorSocketHandler::SendReceive(), NetworkStartServerWindow::SetStringParameters(), and NetworkClientListWindow::SetStringParameters().

## ◆ server_invite_code

std::string NetworkSettings::server_invite_code

Invite code to use when registering as server.

Definition at line 320 of file settings_type.h.

Referenced by ClientNetworkCoordinatorSocketHandler::Receive_GC_REGISTER_ACK(), and ClientNetworkCoordinatorSocketHandler::Register().

## ◆ server_invite_code_secret

std::string NetworkSettings::server_invite_code_secret

Secret to proof we got this invite code from the Game Coordinator.

Definition at line 321 of file settings_type.h.

Referenced by ClientNetworkCoordinatorSocketHandler::Receive_GC_REGISTER_ACK(), and ClientNetworkCoordinatorSocketHandler::Register().

## ◆ server_name

std::string NetworkSettings::server_name

name of the server

Definition at line 322 of file settings_type.h.

Referenced by CheckClientAndServerName(), NetworkClientListWindow::OnClick(), ServerNetworkGameSocketHandler::SendConfigUpdate(), ServerNetworkAdminSocketHandler::SendWelcome(), NetworkClientListWindow::SetStringParameters(), and NetworkClientListWindow::UpdateWidgetSize().

## ◆ server_password

std::string NetworkSettings::server_password

password for joining this server

Definition at line 323 of file settings_type.h.

Referenced by NetworkStartServerWindow::DrawWidget(), NetworkStartServerWindow::OnClick(), and NetworkStartServerWindow::OnQueryTextFinished().

## ◆ server_port

uint16_t NetworkSettings::server_port

port the server listens on

Definition at line 316 of file settings_type.h.

Referenced by NetworkUDPInitialize(), AfterNewGRFScan::OnNewGRFsScanned(), and ClientNetworkCoordinatorSocketHandler::Register().

## ◆ sync_freq

uint16_t NetworkSettings::sync_freq

how often do we check whether we are still in-sync

Definition at line 303 of file settings_type.h.

Referenced by NetworkServer_Tick().

## ◆ use_relay_service

UseRelayService NetworkSettings::use_relay_service

Use relay service?

Definition at line 344 of file settings_type.h.

Referenced by LoadFromConfig(), NetworkAskRelayWindow::OnClick(), and ClientNetworkCoordinatorSocketHandler::Receive_GC_TURN_CONNECT().

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

- src/settings_type.h