OpenTTD Source: src/network/network_udp.h File Reference

OpenTTD Source 1.11.0-RC1

Functions
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 | 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 571 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

  address | The address of the server.
  manually | Whether the address was entered manually.

Definition at line 78 of file network_udp.cpp.

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

Referenced by NetworkGameListRequery().

## ◆ NetworkUDPRemoveAdvertise()

void NetworkUDPRemoveAdvertise | ( | bool | blocking | ) |

Remove our advertise from the master-server.

Parameters

  blocking | whether to wait until the removal has finished.

Definition at line 519 of file network_udp.cpp.

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

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