mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 08:23:17 +02:00
fix networking API calls in IceServer
This commit is contained in:
parent
6d2fea4426
commit
765265abd8
1 changed files with 4 additions and 4 deletions
|
@ -56,12 +56,12 @@ void IceServer::processDatagrams() {
|
|||
|
||||
PacketType::Value packetType = packetTypeForPacket(incomingPacket);
|
||||
|
||||
if (packetType == PacketType::IceServerHeartbeat) {
|
||||
if (packetType == PacketType::ICEServerHeartbeat) {
|
||||
SharedNetworkPeer peer = addOrUpdateHeartbeatingPeer(incomingPacket);
|
||||
|
||||
// so that we can send packets to the heartbeating peer when we need, we need to activate a socket now
|
||||
peer->activateMatchingOrNewSymmetricSocket(sendingSockAddr);
|
||||
} else if (packetType == PacketType::IceServerQuery) {
|
||||
} else if (packetType == PacketType::ICEServerQuery) {
|
||||
QDataStream heartbeatStream(incomingPacket);
|
||||
|
||||
// this is a node hoping to connect to a heartbeating peer - do we have the heartbeating peer?
|
||||
|
@ -128,13 +128,13 @@ SharedNetworkPeer IceServer::addOrUpdateHeartbeatingPeer(const QByteArray& incom
|
|||
}
|
||||
|
||||
void IceServer::sendPeerInformationPacket(const NetworkPeer& peer, const HifiSockAddr* destinationSockAddr) {
|
||||
auto peerPacket = Packet::create(PacketType::IceServerPeerInformation);
|
||||
auto peerPacket = Packet::create(PacketType::ICEServerPeerInformation);
|
||||
|
||||
// get the byte array for this peer
|
||||
peerPacket->write(peer.toByteArray());
|
||||
|
||||
// write the current packet
|
||||
_serverSocket.writeDatagram(peerPacket.constData(), peerPacket.sizeUsed(),
|
||||
_serverSocket.writeDatagram(peerPacket->getData(), peerPacket->getSizeWithHeader(),
|
||||
destinationSockAddr->getAddress(), destinationSockAddr->getPort());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue