|
1 /* $Id$ */ |
|
2 |
|
3 #ifndef NETWORK_CORE_CONFIG_H |
|
4 #define NETWORK_CORE_CONFIG_H |
|
5 |
|
6 #ifdef ENABLE_NETWORK |
|
7 |
|
8 /** DNS hostname of the masterserver */ |
|
9 #define NETWORK_MASTER_SERVER_HOST "master.openttd.org" |
|
10 /** Message sent to the masterserver to 'identify' this client as OpenTTD */ |
|
11 #define NETWORK_MASTER_SERVER_WELCOME_MESSAGE "OpenTTDRegister" |
|
12 |
|
13 enum { |
|
14 NETWORK_MASTER_SERVER_PORT = 3978, ///< The default port of the master server (UDP) |
|
15 NETWORK_DEFAULT_PORT = 3979, ///< The default port of the game server (TCP & UDP) |
|
16 |
|
17 SEND_MTU = 1460, ///< Number of bytes we can pack in a single packet |
|
18 |
|
19 NETWORK_GAME_INFO_VERSION = 4, ///< What version of game-info do we use? |
|
20 NETWORK_COMPANY_INFO_VERSION = 4, ///< What version of company info is this? |
|
21 NETWORK_MASTER_SERVER_VERSION = 1, ///< What version of master-server-protocol do we use? |
|
22 |
|
23 NETWORK_NAME_LENGTH = 80, ///< The maximum length of the server name and map name, in bytes including '\0' |
|
24 NETWORK_HOSTNAME_LENGTH = 80, ///< The maximum length of the host name, in bytes including '\0' |
|
25 NETWORK_REVISION_LENGTH = 15, ///< The maximum length of the revision, in bytes including '\0' |
|
26 NETWORK_PASSWORD_LENGTH = 20, ///< The maximum length of the password, in bytes including '\0' |
|
27 NETWORK_PLAYERS_LENGTH = 200, ///< The maximum length for the list of players that controls a company, in bytes including '\0' |
|
28 NETWORK_CLIENT_NAME_LENGTH = 25, ///< The maximum length of a player, in bytes including '\0' |
|
29 NETWORK_RCONCOMMAND_LENGTH = 500, ///< The maximum length of a rconsole command, in bytes including '\0' |
|
30 |
|
31 NETWORK_GRF_NAME_LENGTH = 80, ///< Maximum length of the name of a GRF |
|
32 /** |
|
33 * Maximum number of GRFs that can be sent. |
|
34 * This value is related to number of handles (files) OpenTTD can open. |
|
35 * This is currently 64 and about 10 are currently used when OpenTTD loads |
|
36 * without any NewGRFs. Therefore one can only load about 55 NewGRFs, so |
|
37 * this is not a limit, but rather a way to easily check whether the limit |
|
38 * imposed by the handle count is reached. Secondly it isn't possible to |
|
39 * send much more GRF IDs + MD5sums in the PACKET_UDP_SERVER_RESPONSE, due |
|
40 * to the limited size of UDP packets. |
|
41 */ |
|
42 NETWORK_MAX_GRF_COUNT = 55, |
|
43 |
|
44 NETWORK_NUM_LANGUAGES = 4, ///< Number of known languages (to the network protocol) + 1 for 'any'. |
|
45 }; |
|
46 |
|
47 #endif /* ENABLE_NETWORK */ |
|
48 |
|
49 #endif /* NETWORK_CORE_CONFIG_H */ |