MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ReceiveInvalidPacket

Method ReceiveInvalidPacket

src/network/core/udp.cpp:187–190  ·  view source on GitHub ↗

* Helper for logging receiving invalid packets. * @param type The received packet type. * @param client_addr The address we received the packet from. */

Source from the content-addressed store, hash-verified

185 * @param client_addr The address we received the packet from.
186 */
187void NetworkUDPSocketHandler::ReceiveInvalidPacket(PacketUDPType type, NetworkAddress &client_addr)
188{
189 Debug(net, 0, "[udp] Received packet type {} on wrong port from {}", type, client_addr.GetAddressAsString());
190}
191
192void NetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(Packet &, NetworkAddress &client_addr) { this->ReceiveInvalidPacket(PACKET_UDP_CLIENT_FIND_SERVER, client_addr); }
193void NetworkUDPSocketHandler::Receive_SERVER_RESPONSE(Packet &, NetworkAddress &client_addr) { this->ReceiveInvalidPacket(PACKET_UDP_SERVER_RESPONSE, client_addr); }

Callers 2

Calls 1

GetAddressAsStringMethod · 0.80

Tested by

no test coverage detected