1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 20:49:11 +00:00

(svn r16000) -Feature: IPv6 support

This commit is contained in:
rubidium
2009-04-09 01:22:45 +00:00
parent 7118c48b98
commit c0f9af5607
4 changed files with 5 additions and 4 deletions

View File

@@ -74,7 +74,7 @@ public:
* @param port the port
* @param family the address family
*/
NetworkAddress(const char *hostname = "0.0.0.0", uint16 port = 0, int family = AF_INET) :
NetworkAddress(const char *hostname = "", uint16 port = 0, int family = AF_UNSPEC) :
address_length(0)
{
/* Also handle IPv6 bracket enclosed hostnames */

View File

@@ -24,7 +24,7 @@ enum {
NETWORK_GAME_INFO_VERSION = 4, ///< What version of game-info do we use?
NETWORK_COMPANY_INFO_VERSION = 5, ///< What version of company info is this?
NETWORK_MASTER_SERVER_VERSION = 1, ///< What version of master-server-protocol do we use?
NETWORK_MASTER_SERVER_VERSION = 2, ///< What version of master-server-protocol do we use?
NETWORK_NAME_LENGTH = 80, ///< The maximum length of the server name and map name, in bytes including '\0'
NETWORK_COMPANY_NAME_LENGTH = 31, ///< The maximum length of the company name, in bytes including '\0'

View File

@@ -30,6 +30,7 @@ NetworkUDPSocketHandler::NetworkUDPSocketHandler(NetworkAddressList *bind)
* resolving it we need to add an address for each of
* the address families we support. */
*this->bind.Append() = NetworkAddress(NULL, 0, AF_INET);
*this->bind.Append() = NetworkAddress(NULL, 0, AF_INET6);
}
}