OpenTTD Source  1.11.2
network_udp.h File Reference
#include "core/address.h"

Go to the source code of this file.

Functions

void NetworkUDPInitialize ()
 Initialize the whole UDP bit.
 
void NetworkUDPSearchGame ()
 Find all servers.
 
void NetworkUDPQueryMasterServer ()
 Request the the server-list from the master server.
 
void NetworkUDPQueryServer (NetworkAddress address, bool manually=false)
 Query a specific server. More...
 
void NetworkUDPAdvertise ()
 Register us to the master server This function checks if it needs to send an advertise. More...
 
void NetworkUDPRemoveAdvertise (bool blocking)
 Remove our advertise from the master-server. More...
 
void NetworkUDPClose ()
 Close all UDP related stuff.
 
void NetworkUDPServerListen ()
 Start the listening of the UDP server component.
 
void NetworkBackgroundUDPLoop ()
 Receive the UDP packets.
 

Detailed Description

Sending and receiving UDP messages.

Definition in file network_udp.h.

Function Documentation

◆ NetworkUDPAdvertise()

void NetworkUDPAdvertise ( )

Register us to the master server This function checks if it needs to send an advertise.

< The last time we performed an advertisement.

Definition at line 565 of file network_udp.cpp.

References _network_advertise_retries, _network_need_advertise, _network_server, _network_udp_server, _networking, _settings_client, ADVERTISE_NORMAL_INTERVAL(), ADVERTISE_RETRY_INTERVAL(), ADVERTISE_RETRY_TIMES, ClientSettings::network, NetworkUDPAdvertiseThread(), NetworkSettings::server_advertise, and StartNewThread().

◆ NetworkUDPQueryServer()

void NetworkUDPQueryServer ( NetworkAddress  address,
bool  manually 
)

Query a specific server.

Parameters
addressThe address of the server.
manuallyWhether the address was entered manually.

Definition at line 112 of file network_udp.cpp.

References DoNetworkUDPQueryServer(), NetworkAddress::IsResolved(), and StartNewThread().

Referenced by NetworkGameListRequery(), and ShowNetworkLobbyWindow().

◆ NetworkUDPRemoveAdvertise()

void NetworkUDPRemoveAdvertise ( bool  blocking)

Remove our advertise from the master-server.

Parameters
blockingwhether to wait until the removal has finished.

Definition at line 513 of file network_udp.cpp.

References _network_server, _network_udp_server, _networking, NetworkUDPRemoveAdvertiseThread(), and StartNewThread().

Referenced by NetworkDisconnect(), and MasterNetworkUDPSocketHandler::Receive_MASTER_ACK_REGISTER().