void NodeList::processDomainServerAddedNode(QSharedPointer<ReceivedMessage> message) { // setup a QDataStream QDataStream packetStream(message->getMessage()); // use our shared method to pull out the new node parseNodeFromPacketStream(packetStream); }
void NodeList::processDomainServerAddedNode(QSharedPointer<NLPacket> packet) { // setup a QDataStream QDataStream packetStream(packet.data()); // use our shared method to pull out the new node parseNodeFromPacketStream(packetStream); }
void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message) { if (_domainHandler.getSockAddr().isNull()) { // refuse to process this packet if we aren't currently connected to the DS return; } // this is a packet from the domain server, reset the count of un-replied check-ins _numNoReplyDomainCheckIns = 0; // emit our signal so listeners know we just heard from the DS emit receivedDomainServerList(); DependencyManager::get<NodeList>()->flagTimeForConnectionStep(LimitedNodeList::ConnectionStep::ReceiveDSList); QDataStream packetStream(message->getMessage()); // grab the domain's ID from the beginning of the packet QUuid domainUUID; packetStream >> domainUUID; // if this was the first domain-server list from this domain, we've now connected if (!_domainHandler.isConnected()) { _domainHandler.setUUID(domainUUID); _domainHandler.setIsConnected(true); } // pull our owner UUID from the packet, it's always the first thing QUuid newUUID; packetStream >> newUUID; setSessionUUID(newUUID); quint8 isAllowedEditor; packetStream >> isAllowedEditor; setIsAllowedEditor((bool) isAllowedEditor); quint8 thisNodeCanRez; packetStream >> thisNodeCanRez; setThisNodeCanRez((bool) thisNodeCanRez); // pull each node in the packet while (packetStream.device()->pos() < message->getSize()) { parseNodeFromPacketStream(packetStream); } }