OpenTTD Source
20241121-master-g67a0fccfad
|
Configuration of the connection strings for network stuff using environment variables. More...
Go to the source code of this file.
Functions | |
static const char * | GetEnv (const char *variable, const char *fallback) |
Get the environment variable using std::getenv and when it is an empty string (or nullptr), return a fallback value instead. More... | |
const char * | NetworkCoordinatorConnectionString () |
Get the connection string for the game coordinator from the environment variable OTTD_COORDINATOR_CS, or when it has not been set a hard coded default DNS hostname of the production server. More... | |
const char * | NetworkStunConnectionString () |
Get the connection string for the STUN server from the environment variable OTTD_STUN_CS, or when it has not been set a hard coded default DNS hostname of the production server. More... | |
const char * | NetworkContentServerConnectionString () |
Get the connection string for the content server from the environment variable OTTD_CONTENT_SERVER_CS, or when it has not been set a hard coded default DNS hostname of the production server. More... | |
const char * | NetworkContentMirrorUriString () |
Get the URI string for the content mirror from the environment variable OTTD_CONTENT_MIRROR_URI, or when it has not been set a hard coded URI of the production server. More... | |
const char * | NetworkSurveyUriString () |
Get the URI string for the survey from the environment variable OTTD_SURVEY_URI, or when it has not been set a hard coded URI of the production server. More... | |
Configuration of the connection strings for network stuff using environment variables.
Definition in file config.cpp.
|
static |
Get the environment variable using std::getenv and when it is an empty string (or nullptr), return a fallback value instead.
variable | The environment variable to read from. |
fallback | The fallback in case the environment variable is not set. |
Definition at line 24 of file config.cpp.
References StrEmpty().
Referenced by NetworkContentMirrorUriString(), NetworkContentServerConnectionString(), NetworkCoordinatorConnectionString(), NetworkStunConnectionString(), and NetworkSurveyUriString().
const char* NetworkContentMirrorUriString | ( | ) |
Get the URI string for the content mirror from the environment variable OTTD_CONTENT_MIRROR_URI, or when it has not been set a hard coded URI of the production server.
Definition at line 65 of file config.cpp.
References GetEnv().
Referenced by ClientNetworkContentSocketHandler::DownloadSelectedContentHTTP().
const char* NetworkContentServerConnectionString | ( | ) |
Get the connection string for the content server from the environment variable OTTD_CONTENT_SERVER_CS, or when it has not been set a hard coded default DNS hostname of the production server.
Definition at line 55 of file config.cpp.
References GetEnv().
Referenced by ClientNetworkContentSocketHandler::Connect().
const char* NetworkCoordinatorConnectionString | ( | ) |
Get the connection string for the game coordinator from the environment variable OTTD_COORDINATOR_CS, or when it has not been set a hard coded default DNS hostname of the production server.
Definition at line 35 of file config.cpp.
References GetEnv().
const char* NetworkStunConnectionString | ( | ) |
Get the connection string for the STUN server from the environment variable OTTD_STUN_CS, or when it has not been set a hard coded default DNS hostname of the production server.
Definition at line 45 of file config.cpp.
References GetEnv().
Referenced by ClientNetworkStunSocketHandler::Connect().
const char* NetworkSurveyUriString | ( | ) |
Get the URI string for the survey from the environment variable OTTD_SURVEY_URI, or when it has not been set a hard coded URI of the production server.
Definition at line 75 of file config.cpp.
References GetEnv().