mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 12:52:45 +02:00
add an identifier for repeated requests to the ice server
This commit is contained in:
parent
cca1c30207
commit
11659401ee
2 changed files with 8 additions and 3 deletions
|
@ -53,13 +53,15 @@ void IceServer::processDatagrams() {
|
|||
if (!matchingPeer) {
|
||||
// if we don't have this sender we need to create them now
|
||||
matchingPeer = SharedNetworkPeer(new NetworkPeer(senderUUID, publicSocket, localSocket));
|
||||
_activePeers.insert(senderUUID, matchingPeer);
|
||||
|
||||
qDebug() << "Added a new network peer" << *matchingPeer;
|
||||
|
||||
} else {
|
||||
// we already had the peer so just potentially update their sockets
|
||||
matchingPeer->setPublicSocket(publicSocket);
|
||||
matchingPeer->setLocalSocket(localSocket);
|
||||
|
||||
qDebug() << "Matched hearbeat to existing network peer" << *matchingPeer;
|
||||
}
|
||||
|
||||
// check if this node also included a UUID that they would like to connect to
|
||||
|
|
|
@ -250,7 +250,7 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
bool isUsingDTLS = false;
|
||||
|
||||
PacketType domainPacketType = !_domainHandler.isConnected()
|
||||
? PacketTypeDomainConnectRequest : PacketTypeDomainListRequest;
|
||||
? PacketTypeDomainConnectRequest : PacketTypeDomainListRequest;
|
||||
|
||||
if (!_domainHandler.isConnected()) {
|
||||
qDebug() << "Sending connect request to domain-server at" << _domainHandler.getHostname();
|
||||
|
@ -303,7 +303,10 @@ void NodeList::sendDomainServerCheckIn() {
|
|||
}
|
||||
|
||||
void NodeList::sendICERequestForDomainConnection() {
|
||||
QByteArray iceRequestByteArray = byteArrayWithPopulatedHeader(PacketTypeIceServerHeartbeat);
|
||||
|
||||
static QUuid iceUUID = QUuid::createUuid();
|
||||
|
||||
QByteArray iceRequestByteArray = byteArrayWithPopulatedHeader(PacketTypeIceServerHeartbeat, iceUUID);
|
||||
QDataStream iceDataStream(&iceRequestByteArray, QIODevice::Append);
|
||||
|
||||
iceDataStream << _publicSockAddr << HifiSockAddr(QHostAddress(getHostOrderLocalAddress()), _nodeSocket.localPort());
|
||||
|
|
Loading…
Reference in a new issue