History

added more client side voxel stats including lost packets, out of order packets, and average flight time

ZappoMan committed 12 years ago

Commit 7f9d0841 parent 21bf10b7 files · +190 −39Browse files

Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all

Unified · Split

interface/src/Application.cpp+18−0
@@ -4318,6 +4318,24 @@ void Application::nodeKilled(Node* node) { · 4317 unmodified lines
43184318 }
43194319 }
43204320
4321+void Application::trackIncomingVoxelPacket(unsigned char* messageData, ssize_t messageLength,
4322+ sockaddr senderAddress, bool wasStatsPacket) {
4323+
4324+ // Attempt to identify the sender from it's address.
4325+ Node* voxelServer = NodeList::getInstance()->nodeWithAddress(&senderAddress);
4326+ if (voxelServer) {
4327+ QUuid nodeUUID = voxelServer->getUUID();
4328+
4329+ // now that we know the node ID, let's add these stats to the stats for that node...
4330+ _voxelSceneStatsLock.lockForWrite();
4331+ if (_voxelServerSceneStats.find(nodeUUID) != _voxelServerSceneStats.end()) {
4332+ VoxelSceneStats& stats = _voxelServerSceneStats[nodeUUID];
4333+ stats.trackIncomingVoxelPacket(messageData, messageLength, wasStatsPacket);
4334+ }
4335+ _voxelSceneStatsLock.unlock();
4336+ }
4337+}
4338+
43214339 int Application::parseVoxelStats(unsigned char* messageData, ssize_t messageLength, sockaddr senderAddress) {
43224340
43234341 // But, also identify the sender, and keep track of the contained jurisdiction root for this server

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t