* Callback from the STUN connecter to inform the Game Coordinator about the * result of the STUN. * * This helps the Game Coordinator not to wait for a timeout on its end, but * rather react as soon as the client/server knows the result. */
| 619 | * rather react as soon as the client/server knows the result. |
| 620 | */ |
| 621 | void ClientNetworkCoordinatorSocketHandler::StunResult(std::string_view token, uint8_t family, bool result) |
| 622 | { |
| 623 | auto p = std::make_unique<Packet>(this, PACKET_COORDINATOR_SERCLI_STUN_RESULT); |
| 624 | p->Send_uint8(NETWORK_COORDINATOR_VERSION); |
| 625 | p->Send_string(token); |
| 626 | p->Send_uint8(family); |
| 627 | p->Send_bool(result); |
| 628 | Debug(net, 9, "Coordinator::SendStunResult({}, {}, {})", token, family, result); |
| 629 | this->SendPacket(std::move(p)); |
| 630 | } |
| 631 | |
| 632 | /** |
| 633 | * Close the STUN handler. |
no test coverage detected