OpenTTD Source: src/network/core/udp.h File Reference

OpenTTD Source 1.11.0-RC1

Data Structures | Enumerations
udp.h File Reference
`#include "address.h"`
`#include "game.h"`
`#include "packet.h"`

Go to the source code of this file.

## Data Structures
class | NetworkUDPSocketHandler
| Base socket handler for all UDP sockets. More...

## Enumerations
enum | PacketUDPType { PACKET_UDP_CLIENT_FIND_SERVER, PACKET_UDP_SERVER_RESPONSE, PACKET_UDP_CLIENT_DETAIL_INFO, PACKET_UDP_SERVER_DETAIL_INFO, PACKET_UDP_SERVER_REGISTER, PACKET_UDP_MASTER_ACK_REGISTER, PACKET_UDP_CLIENT_GET_LIST, PACKET_UDP_MASTER_RESPONSE_LIST, PACKET_UDP_SERVER_UNREGISTER, PACKET_UDP_CLIENT_GET_NEWGRFS, PACKET_UDP_SERVER_NEWGRFS, PACKET_UDP_MASTER_SESSION_KEY, PACKET_UDP_END }
| Enum with all types of UDP packets. More...
enum | ServerListType { SLT_IPv4 = 0, SLT_IPv6 = 1, SLT_AUTODETECT, SLT_END = SLT_AUTODETECT }
| The types of server lists we can get. More...

## Detailed Description

Basic functions to receive and send UDP packets.

Definition in file udp.h.

## Enumeration Type Documentation

## ◆ PacketUDPType

enum PacketUDPType

Enum with all types of UDP packets.

The order MUST not be changed

Enumerator
PACKET_UDP_CLIENT_FIND_SERVER | Queries a game server for game information.
PACKET_UDP_SERVER_RESPONSE | Reply of the game server with game information.
PACKET_UDP_CLIENT_DETAIL_INFO | Queries a game server about details of the game, such as companies.
PACKET_UDP_SERVER_DETAIL_INFO | Reply of the game server about details of the game, such as companies.
PACKET_UDP_SERVER_REGISTER | Packet to register itself to the master server.
PACKET_UDP_MASTER_ACK_REGISTER | Packet indicating registration has succeeded.
PACKET_UDP_CLIENT_GET_LIST | Request for serverlist from master server.
PACKET_UDP_MASTER_RESPONSE_LIST | Response from master server with server ip's + port's.
PACKET_UDP_SERVER_UNREGISTER | Request to be removed from the server-list.
PACKET_UDP_CLIENT_GET_NEWGRFS | Requests the name for a list of GRFs (GRF_ID and MD5)
PACKET_UDP_SERVER_NEWGRFS | Sends the list of NewGRF's requested.
PACKET_UDP_MASTER_SESSION_KEY | Sends a fresh session key to the client.
PACKET_UDP_END | Must ALWAYS be on the end of this list!! (period)

Definition at line 20 of file udp.h.

## ◆ ServerListType

enum ServerListType

The types of server lists we can get.

Enumerator
SLT_IPv4 | Get the IPv4 addresses.
SLT_IPv6 | Get the IPv6 addresses.
SLT_AUTODETECT | Autodetect the type based on the connection.
SLT_END | End of 'arrays' marker.

Definition at line 37 of file udp.h.