mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 11:42:55 +02:00
pass const NLPacket& for all sendUnreliablePacket calls
This commit is contained in:
parent
a49b985dad
commit
a363f42bb2
6 changed files with 8 additions and 13 deletions
|
@ -1029,7 +1029,7 @@ void DomainServer::broadcastNewNode(const SharedNodePointer& addedNode) {
|
||||||
addNodePacket->write(rfcConnectionSecret);
|
addNodePacket->write(rfcConnectionSecret);
|
||||||
|
|
||||||
// send off this packet to the node
|
// send off this packet to the node
|
||||||
limitedNodeList->sendUnreliablePacket(addNodePacket, node);
|
limitedNodeList->sendUnreliablePacket(*addNodePacket, node);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1093,7 +1093,7 @@ void DomainServer::readAvailableDatagrams() {
|
||||||
|
|
||||||
assignmentStream << uniqueAssignment;
|
assignmentStream << uniqueAssignment;
|
||||||
|
|
||||||
limitedNodeList->sendUnreliablePacket(assignmentPacket, senderSockAddr);
|
limitedNodeList->sendUnreliablePacket(*assignmentPacket, senderSockAddr);
|
||||||
|
|
||||||
// add the information for that deployed assignment to the hash of pending assigned nodes
|
// add the information for that deployed assignment to the hash of pending assigned nodes
|
||||||
PendingAssignedNodeData* pendingNodeData = new PendingAssignedNodeData(assignmentToDeploy->getUUID(),
|
PendingAssignedNodeData* pendingNodeData = new PendingAssignedNodeData(assignmentToDeploy->getUUID(),
|
||||||
|
@ -1124,7 +1124,7 @@ void DomainServer::readAvailableDatagrams() {
|
||||||
dtlsRequiredPacket->writePrimitive(dtlsPort);
|
dtlsRequiredPacket->writePrimitive(dtlsPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
limitedNodeList->sendUnreliablePacket(dtlsRequiredPacket, senderSockAddr);
|
limitedNodeList->sendUnreliablePacket(*dtlsRequiredPacket, senderSockAddr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2891,7 +2891,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType::Value packetTyp
|
||||||
queryPacket->setSizeUsed(packetSize);
|
queryPacket->setSizeUsed(packetSize);
|
||||||
|
|
||||||
// make sure we still have an active socket
|
// make sure we still have an active socket
|
||||||
nodeList->sendUnreliablePacket(queryPacket, node);
|
nodeList->sendUnreliablePacket(*queryPacket, node);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -882,7 +882,7 @@ void AudioClient::handleAudioInput() {
|
||||||
|
|
||||||
nodeList->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SendAudioPacket);
|
nodeList->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::SendAudioPacket);
|
||||||
|
|
||||||
nodeList->sendUnreliablePacket(_audioPacket, audioMixer);
|
nodeList->sendUnreliablePacket(*_audioPacket, audioMixer);
|
||||||
|
|
||||||
_outgoingAvatarAudioSequenceNumber++;
|
_outgoingAvatarAudioSequenceNumber++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,7 +238,7 @@ void AudioInjector::injectToMixer() {
|
||||||
SharedNodePointer audioMixer = nodeList->soloNodeOfType(NodeType::AudioMixer);
|
SharedNodePointer audioMixer = nodeList->soloNodeOfType(NodeType::AudioMixer);
|
||||||
|
|
||||||
// send off this audio packet
|
// send off this audio packet
|
||||||
nodeList->sendUnreliablePacket(audioPacket, audioMixer);
|
nodeList->sendUnreliablePacket(*audioPacket, audioMixer);
|
||||||
outgoingInjectedAudioSequenceNumber++;
|
outgoingInjectedAudioSequenceNumber++;
|
||||||
|
|
||||||
_currentSendPosition += bytesToCopy;
|
_currentSendPosition += bytesToCopy;
|
||||||
|
|
|
@ -144,16 +144,11 @@ public:
|
||||||
// qint64 writeUnverifiedDatagram(const char* data, qint64 size, const SharedNodePointer& destinationNode,
|
// qint64 writeUnverifiedDatagram(const char* data, qint64 size, const SharedNodePointer& destinationNode,
|
||||||
// const HifiSockAddr& overridenSockAddr = HifiSockAddr());
|
// const HifiSockAddr& overridenSockAddr = HifiSockAddr());
|
||||||
//
|
//
|
||||||
|
|
||||||
qint64 sendUnreliablePacket(const NLPacket& packet, const SharedNodePointer& destinationNode)
|
qint64 sendUnreliablePacket(const NLPacket& packet, const SharedNodePointer& destinationNode)
|
||||||
{ assert(false); return 0; }
|
{ assert(false); return 0; }
|
||||||
qint64 sendUnreliablePacket(const NLPacket& packet, const HifiSockAddr& sockAddr)
|
qint64 sendUnreliablePacket(const NLPacket& packet, const HifiSockAddr& sockAddr)
|
||||||
{ assert(false); return 0; }
|
{ assert(false); return 0; }
|
||||||
// TODO remove those
|
|
||||||
qint64 sendUnreliablePacket(std::unique_ptr<NLPacket>& packet, const SharedNodePointer& destinationNode)
|
|
||||||
{ assert(false); return 0; }
|
|
||||||
qint64 sendUnreliablePacket(std::unique_ptr<NLPacket>& packet, const HifiSockAddr& sockAddr)
|
|
||||||
{ assert(false); return 0; }
|
|
||||||
|
|
||||||
qint64 sendPacket(std::unique_ptr<NLPacket> packet, const SharedNodePointer& destinationNode)
|
qint64 sendPacket(std::unique_ptr<NLPacket> packet, const SharedNodePointer& destinationNode)
|
||||||
{ assert(false); return 0; }
|
{ assert(false); return 0; }
|
||||||
|
|
|
@ -272,7 +272,7 @@ bool PacketSender::nonThreadedProcess() {
|
||||||
unlock();
|
unlock();
|
||||||
|
|
||||||
// send the packet through the NodeList...
|
// send the packet through the NodeList...
|
||||||
DependencyManager::get<NodeList>()->sendUnreliablePacket(packetPair.second, packetPair.first);
|
DependencyManager::get<NodeList>()->sendUnreliablePacket(*(packetPair.second), packetPair.first);
|
||||||
|
|
||||||
packetsSentThisCall++;
|
packetsSentThisCall++;
|
||||||
_packetsOverCheckInterval++;
|
_packetsOverCheckInterval++;
|
||||||
|
|
Loading…
Reference in a new issue