void Node::parseIgnoreRequestMessage(QSharedPointer<ReceivedMessage> message) { while (message->getBytesLeftToRead()) { // parse out the UUID being ignored from the packet QUuid ignoredUUID = QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID)); addIgnoredNode(ignoredUUID); } }
void Node::parseIgnoreRequestMessage(QSharedPointer<ReceivedMessage> message) { bool addToIgnore; message->readPrimitive(&addToIgnore); while (message->getBytesLeftToRead()) { // parse out the UUID being ignored from the packet QUuid ignoredUUID = QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID)); if (addToIgnore) { addIgnoredNode(ignoredUUID); } else { removeIgnoredNode(ignoredUUID); } } }
Node::NodesIgnoredPair Node::parseIgnoreRequestMessage(QSharedPointer<ReceivedMessage> message) { bool addToIgnore; message->readPrimitive(&addToIgnore); std::vector<QUuid> nodesIgnored; while (message->getBytesLeftToRead()) { // parse out the UUID being ignored from the packet QUuid ignoredUUID = QUuid::fromRfc4122(message->readWithoutCopy(NUM_BYTES_RFC4122_UUID)); if (addToIgnore) { addIgnoredNode(ignoredUUID); } else { removeIgnoredNode(ignoredUUID); } nodesIgnored.push_back(ignoredUUID); } return { nodesIgnored, addToIgnore }; }