OpenTTD Source 20260208-master-g43af8e94d0
address.h File Reference

Wrapper for network addresses. More...

#include "os_abstraction.h"
#include "config.h"
#include "../../company_type.h"
#include "../../string_func.h"

Go to the source code of this file.

Data Structures

class  NetworkAddress
 Wrapper for (un)resolved network addresses; there's no reason to transform a numeric IP to a string and then back again to pass it to functions. More...
class  ServerAddress
 Address to a game server. More...

Typedefs

typedef std::vector< NetworkAddressNetworkAddressList
 Type for a list of addresses.
using SocketList = std::map<SOCKET, NetworkAddress>
 Type for a mapping between address and socket.

Enumerations

enum  ServerAddressType : uint8_t { SERVER_ADDRESS_DIRECT , SERVER_ADDRESS_INVITE_CODE }
 Types of server addresses we know. More...

Detailed Description

Wrapper for network addresses.

Definition in file address.h.

Typedef Documentation

◆ NetworkAddressList

typedef std::vector<NetworkAddress> NetworkAddressList

Type for a list of addresses.

Definition at line 20 of file address.h.

◆ SocketList

using SocketList = std::map<SOCKET, NetworkAddress>

Type for a mapping between address and socket.

Definition at line 21 of file address.h.

Enumeration Type Documentation

◆ ServerAddressType

enum ServerAddressType : uint8_t

Types of server addresses we know.

Sorting will prefer entries at the top of this list above ones at the bottom.

Enumerator
SERVER_ADDRESS_DIRECT 

Server-address is based on an hostname:port.

SERVER_ADDRESS_INVITE_CODE 

Server-address is based on an invite code.

Definition at line 174 of file address.h.