mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 14:42:03 +02:00
Merge branch 'protocol' of https://github.com/huffman/hifi into protocol
This commit is contained in:
commit
fec6b6b0bb
4 changed files with 10 additions and 5 deletions
|
@ -574,10 +574,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
|||
|
||||
// hook up bandwidth estimator
|
||||
QSharedPointer<BandwidthRecorder> bandwidthRecorder = DependencyManager::get<BandwidthRecorder>();
|
||||
connect(nodeList.data(), SIGNAL(dataSent(const quint8, const int)),
|
||||
bandwidthRecorder.data(), SLOT(updateOutboundData(const quint8, const int)));
|
||||
connect(nodeList.data(), SIGNAL(dataReceived(const quint8, const int)),
|
||||
bandwidthRecorder.data(), SLOT(updateInboundData(const quint8, const int)));
|
||||
connect(nodeList.data(), &LimitedNodeList::dataSent,
|
||||
bandwidthRecorder.data(), &BandwidthRecorder::updateOutboundData);
|
||||
connect(&nodeList->getPacketReceiver(), &PacketReceiver::dataReceived,
|
||||
bandwidthRecorder.data(), &BandwidthRecorder::updateInboundData);
|
||||
|
||||
connect(&_myAvatar->getSkeletonModel(), &SkeletonModel::skeletonLoaded,
|
||||
this, &Application::checkSkeleton, Qt::QueuedConnection);
|
||||
|
|
|
@ -226,6 +226,8 @@ qint64 LimitedNodeList::writePacket(const NLPacket& packet, const Node& destinat
|
|||
PacketSequenceNumber sequenceNumber = getNextSequenceNumberForPacket(destinationNode.getUUID(), packet.getType());
|
||||
const_cast<NLPacket&>(packet).writeSequenceNumber(sequenceNumber);
|
||||
}
|
||||
|
||||
emit dataSent(destinationNode.getType(), packet.getDataSize());
|
||||
|
||||
return writePacket(packet, *destinationNode.getActiveSocket(), destinationNode.getConnectionSecret());
|
||||
}
|
||||
|
@ -241,6 +243,8 @@ qint64 LimitedNodeList::writePacket(const NLPacket& packet, const HifiSockAddr&
|
|||
&& !NON_VERIFIED_PACKETS.contains(packet.getType())) {
|
||||
const_cast<NLPacket&>(packet).writeVerificationHash(packet.payloadHashWithConnectionUUID(connectionSecret));
|
||||
}
|
||||
|
||||
emit dataSent(NodeType::Unassigned, packet.getDataSize());
|
||||
|
||||
return writeDatagram(QByteArray::fromRawData(packet.getData(), packet.getDataSize()), destinationSockAddr);
|
||||
}
|
||||
|
|
|
@ -232,6 +232,8 @@ public slots:
|
|||
void killNodeWithUUID(const QUuid& nodeUUID);
|
||||
|
||||
signals:
|
||||
void dataSent(quint8 channelType, int bytes);
|
||||
|
||||
void uuidChanged(const QUuid& ownerUUID, const QUuid& oldUUID);
|
||||
void nodeAdded(SharedNodePointer);
|
||||
void nodeKilled(SharedNodePointer);
|
||||
|
|
|
@ -49,7 +49,6 @@ public slots:
|
|||
void processDatagrams();
|
||||
|
||||
signals:
|
||||
void dataSent(quint8 channelType, int bytes);
|
||||
void dataReceived(quint8 channelType, int bytes);
|
||||
void packetVersionMismatch(PacketType::Value type);
|
||||
|
||||
|
|
Loading…
Reference in a new issue