|
OpenTTD Source 20260421-master-gc2fbc6fdeb
|
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) | |
| Create this socket. | |
| void | CloseSocket () |
| Close the actual UDP socket. | |
| void | ReceivePackets () |
| Receive a packet at UDP level. | |
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. | |
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.
|
inline |
Create this socket.
| name | The name of the socket for logging purposes. |
Definition at line 37 of file network_udp.cpp.
References name.
|
inline |
Close the actual UDP socket.
Definition at line 40 of file network_udp.cpp.
|
inline |
Receive a packet at UDP level.
Definition at line 47 of file network_udp.cpp.
| const std::string UDPSocket::name |
| 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.