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

OpenTTD Source 15.0-beta1

Functions
network_udp.h File Reference

Sending and receiving UDP messages. More...

`#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 | 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

## ◆ NetworkBackgroundUDPLoop()

void NetworkBackgroundUDPLoop | ( |  | ) |

Receive the UDP packets.

Definition at line 161 of file network_udp.cpp.

References _network_udp_broadcast, _network_udp_server, _udp_client, and _udp_server.

Referenced by NetworkBackgroundLoop().

## ◆ NetworkUDPClose()

void NetworkUDPClose | ( |  | ) |

Close all UDP related stuff.

Definition at line 150 of file network_udp.cpp.

References _network_udp_broadcast, _network_udp_server, _udp_client, _udp_server, and Debug.

Referenced by NetworkShutDown(), and NetworkUDPInitialize().

## ◆ NetworkUDPInitialize()

void NetworkUDPInitialize | ( |  | ) |

Initialize the whole UDP bit.

Definition at line 125 of file network_udp.cpp.

References _network_udp_broadcast, _network_udp_server, _settings_client, _udp_client, _udp_server, Debug, GetBindAddresses(), ClientSettings::network, NetworkUDPClose(), NetworkSettings::server_port, and UDPSocket::socket.

Referenced by NetworkDisconnect(), and NetworkStartUp().

## ◆ NetworkUDPSearchGame()

void NetworkUDPSearchGame | ( |  | ) |

Find all servers.

Definition at line 113 of file network_udp.cpp.

References _network_udp_broadcast, _udp_client, Debug, NetworkUDPBroadCast(), and UDPSocket::socket.

Referenced by NetworkGameWindow::OnClick().

## ◆ NetworkUDPServerListen()

void NetworkUDPServerListen | ( |  | ) |

Start the listening of the UDP server component.

Definition at line 144 of file network_udp.cpp.

References _network_udp_server, _udp_server, NetworkUDPSocketHandler::Listen(), and UDPSocket::socket.