celestar@5642: /* $Id$ */ celestar@5642: celestar@5642: #ifndef NETWORK_CORE_CONFIG_H celestar@5642: #define NETWORK_CORE_CONFIG_H celestar@5642: celestar@5642: #ifdef ENABLE_NETWORK celestar@5642: celestar@5642: /** DNS hostname of the masterserver */ celestar@5642: #define NETWORK_MASTER_SERVER_HOST "master.openttd.org" celestar@5642: /** Message sent to the masterserver to 'identify' this client as OpenTTD */ celestar@5642: #define NETWORK_MASTER_SERVER_WELCOME_MESSAGE "OpenTTDRegister" celestar@5642: celestar@5642: enum { celestar@5642: NETWORK_MASTER_SERVER_PORT = 3978, ///< The default port of the master server (UDP) celestar@5642: NETWORK_DEFAULT_PORT = 3979, ///< The default port of the game server (TCP & UDP) celestar@5642: celestar@5642: SEND_MTU = 1460, ///< Number of bytes we can pack in a single packet celestar@5642: celestar@5642: NETWORK_GAME_INFO_VERSION = 4, ///< What version of game-info do we use? celestar@5642: NETWORK_COMPANY_INFO_VERSION = 4, ///< What version of company info is this? celestar@5642: NETWORK_MASTER_SERVER_VERSION = 1, ///< What version of master-server-protocol do we use? celestar@5642: celestar@5642: NETWORK_NAME_LENGTH = 80, ///< The maximum length of the server name and map name, in bytes including '\0' celestar@5642: NETWORK_HOSTNAME_LENGTH = 80, ///< The maximum length of the host name, in bytes including '\0' celestar@5642: NETWORK_REVISION_LENGTH = 15, ///< The maximum length of the revision, in bytes including '\0' celestar@5642: NETWORK_PASSWORD_LENGTH = 20, ///< The maximum length of the password, in bytes including '\0' celestar@5642: NETWORK_PLAYERS_LENGTH = 200, ///< The maximum length for the list of players that controls a company, in bytes including '\0' celestar@5642: NETWORK_CLIENT_NAME_LENGTH = 25, ///< The maximum length of a player, in bytes including '\0' celestar@5642: NETWORK_RCONCOMMAND_LENGTH = 500, ///< The maximum length of a rconsole command, in bytes including '\0' celestar@5642: celestar@5642: NETWORK_GRF_NAME_LENGTH = 80, ///< Maximum length of the name of a GRF celestar@5642: /** celestar@5642: * Maximum number of GRFs that can be sent. celestar@5642: * This value is related to number of handles (files) OpenTTD can open. celestar@5642: * This is currently 64 and about 10 are currently used when OpenTTD loads celestar@5642: * without any NewGRFs. Therefore one can only load about 55 NewGRFs, so celestar@5642: * this is not a limit, but rather a way to easily check whether the limit celestar@5642: * imposed by the handle count is reached. Secondly it isn't possible to celestar@5642: * send much more GRF IDs + MD5sums in the PACKET_UDP_SERVER_RESPONSE, due celestar@5642: * to the limited size of UDP packets. celestar@5642: */ celestar@5642: NETWORK_MAX_GRF_COUNT = 55, celestar@5642: celestar@5642: NETWORK_NUM_LANGUAGES = 4, ///< Number of known languages (to the network protocol) + 1 for 'any'. celestar@5642: }; celestar@5642: celestar@5642: #endif /* ENABLE_NETWORK */ celestar@5642: celestar@5642: #endif /* NETWORK_CORE_CONFIG_H */