mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
send an ACK packet from ice server for verified hearbeat
This commit is contained in:
parent
8832a9d9ed
commit
6ef9fbfcc0
1 changed files with 5 additions and 0 deletions
|
@ -82,6 +82,11 @@ void IceServer::processPacket(std::unique_ptr<udt::Packet> packet) {
|
||||||
if (peer) {
|
if (peer) {
|
||||||
// so that we can send packets to the heartbeating peer when we need, we need to activate a socket now
|
// so that we can send packets to the heartbeating peer when we need, we need to activate a socket now
|
||||||
peer->activateMatchingOrNewSymmetricSocket(nlPacket->getSenderSockAddr());
|
peer->activateMatchingOrNewSymmetricSocket(nlPacket->getSenderSockAddr());
|
||||||
|
|
||||||
|
// we have an active and verified heartbeating peer
|
||||||
|
// send them an ACK packet so they know that they are being heard and ready for ICE
|
||||||
|
static auto ackPacket = NLPacket::create(PacketType::ICEServerHeartbeatACK);
|
||||||
|
_serverSocket.writePacket(*ackPacket, nlPacket->getSenderSockAddr());
|
||||||
} else {
|
} else {
|
||||||
// we couldn't verify this peer - respond back to them so they know they may need to perform keypair re-generation
|
// we couldn't verify this peer - respond back to them so they know they may need to perform keypair re-generation
|
||||||
static auto deniedPacket = NLPacket::create(PacketType::ICEServerHeartbeatDenied);
|
static auto deniedPacket = NLPacket::create(PacketType::ICEServerHeartbeatDenied);
|
||||||
|
|
Loading…
Reference in a new issue