|
OpenTTD Source 20251104-master-g3befbdd52f
|
Helper class for handling all client side communication. More...
Protected Member Functions | |
| void | Receive_SERVER_RESPONSE (Packet &p, NetworkAddress &client_addr) override |
| Response to a query letting the client know we are here. | |
Protected Member Functions inherited from NetworkUDPSocketHandler | |
| void | ReceiveInvalidPacket (PacketUDPType, NetworkAddress &client_addr) |
| Helper for logging receiving invalid packets. | |
| virtual void | Receive_CLIENT_FIND_SERVER (Packet &p, NetworkAddress &client_addr) |
| Queries to the server for information about the game. | |
| void | HandleUDPPacket (Packet &p, NetworkAddress &client_addr) |
| Handle an incoming packets by sending it to the correct function. | |
Additional Inherited Members | |
Public Member Functions inherited from NetworkUDPSocketHandler | |
| NetworkUDPSocketHandler (NetworkAddressList *bind=nullptr) | |
| Create an UDP socket but don't listen yet. | |
| virtual | ~NetworkUDPSocketHandler () |
| On destructing of this class, the socket needs to be closed. | |
| bool | Listen () |
| Start listening on the given host and port. | |
| void | CloseSocket () |
| Close the actual UDP socket. | |
| void | SendPacket (Packet &p, NetworkAddress &recv, bool all=false, bool broadcast=false) |
| Send a packet over UDP. | |
| void | ReceivePackets () |
| Receive a packet at UDP level. | |
Public Member Functions inherited from NetworkSocketHandler | |
| NetworkSocketHandler ()=default | |
| Create a new unbound socket. | |
| virtual | ~NetworkSocketHandler ()=default |
| Close the socket when destructing the socket handler. | |
| void | MarkClosed () |
| Mark the connection as closed. | |
| bool | HasClientQuit () const |
| Whether the current client connected to the socket has quit. | |
| void | Reopen () |
| Reopen the socket so we can send/receive stuff again. | |
Protected Attributes inherited from NetworkUDPSocketHandler | |
| NetworkAddressList | bind |
| The address to bind to. | |
| SocketList | sockets |
| The opened sockets. | |
Protected Attributes inherited from NetworkSocketHandler | |
| std::unique_ptr< class NetworkEncryptionHandler > | receive_encryption_handler = nullptr |
| The handler for decrypting received packets. | |
| std::unique_ptr< class NetworkEncryptionHandler > | send_encryption_handler = nullptr |
| The handler for encrypting sent packets. | |
Helper class for handling all client side communication.
Definition at line 76 of file network_udp.cpp.
|
overrideprotectedvirtual |
Response to a query letting the client know we are here.
| p | The received packet. |
| client_addr | The origin of the packet. |
Reimplemented from NetworkUDPSocketHandler.
Definition at line 83 of file network_udp.cpp.
References Debug, NetworkAddress::GetAddressAsString(), and NetworkAddServer().