History

first cut at added clockSkew support to nodes and PING/PING_REPLY

ZappoMan committed 12 years ago

Commit bfbaf261 parent 864fc107 files · +96 −29Browse files

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

Unified · Split

interface/src/Application.cpp+4−6
@@ -1251,12 +1251,10 @@ void Application::sendPingPackets() { · 1250 unmodified lines
12511251 const char nodesToPing[] = {NODE_TYPE_VOXEL_SERVER, NODE_TYPE_PARTICLE_SERVER,
12521252 NODE_TYPE_AUDIO_MIXER, NODE_TYPE_AVATAR_MIXER};
12531253
1254− uint64_t currentTime = usecTimestampNow();
1255− unsigned char pingPacket[numBytesForPacketHeader((unsigned char*) &PACKET_TYPE_PING) + sizeof(currentTime)];
1256− int numHeaderBytes = populateTypeAndVersion(pingPacket, PACKET_TYPE_PING);
1257−
1258− memcpy(pingPacket + numHeaderBytes, &currentTime, sizeof(currentTime));
1259− getInstance()->controlledBroadcastToNodes(pingPacket, sizeof(pingPacket),
1254+ unsigned char pingPacket[MAX_PACKET_SIZE];
1255+ int length = NodeList::getInstance()->fillPingPacket(pingPacket);
1256+
1257+ getInstance()->controlledBroadcastToNodes(pingPacket, length,
12601258 nodesToPing, sizeof(nodesToPing));
12611259 }
12621260

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