| 130 | } |
| 131 | |
| 132 | void NetworkClient::onReceivePacket([[maybe_unused]] IUdpSocket& socket, std::unique_ptr<INetworkEndpoint> endpoint, const Packet& packet) |
| 133 | { |
| 134 | // TODO do we really need the check, it is possible but unlikely |
| 135 | // for something else to hijack the UDP client port |
| 136 | if (_serverEndpoint != nullptr && endpoint->equals(*_serverEndpoint)) |
| 137 | { |
| 138 | _serverConnection->receivePacket(packet); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | void NetworkClient::onCancel() |
| 143 | { |
nothing calls this directly
no test coverage detected