OpenTTD Source 20241224-master-gee860a5c8e
|
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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().
Referenced by NetworkSurveyHandler::Transmit().