OpenTTD Source: UDPSocket Struct Reference

OpenTTD Source 15.3

Public Member Functions | Data Fields
UDPSocket Struct Reference

Some information about a socket, which exists before the actual socket has been created to provide locking and the likes. More...

## Public Member Functions
| UDPSocket (const std::string &name)
void | CloseSocket ()
void | ReceivePackets ()

## Data Fields
const std::string | name
| The name of the socket.
std::unique_ptr< NetworkUDPSocketHandler > | socket = nullptr
| The actual socket, which may be nullptr when not initialized yet.

## Detailed Description

Some information about a socket, which exists before the actual socket has been created to provide locking and the likes.

Definition at line 29 of file network_udp.cpp.

## Constructor & Destructor Documentation

## ◆ UDPSocket()

UDPSocket::UDPSocket | ( | const std::string & | name | ) |
| inline

Definition at line 33 of file network_udp.cpp.

## Member Function Documentation

## ◆ CloseSocket()

void UDPSocket::CloseSocket | ( |  | ) |
| inline

Definition at line 35 of file network_udp.cpp.

## ◆ ReceivePackets()

void UDPSocket::ReceivePackets | ( |  | ) |
| inline

Definition at line 41 of file network_udp.cpp.

## Field Documentation

## ◆ name

const std::string UDPSocket::name

The name of the socket.

Definition at line 30 of file network_udp.cpp.

## ◆ socket

std::unique_ptr<NetworkUDPSocketHandler> UDPSocket::socket = nullptr

The actual socket, which may be nullptr when not initialized yet.

Definition at line 31 of file network_udp.cpp.

Referenced by NetworkUDPInitialize(), NetworkUDPSearchGame(), and NetworkUDPServerListen().

The documentation for this struct was generated from the following file:

- src/network/network_udp.cpp