diff --git a/assignment-client/src/avatars/AvatarMixer.cpp b/assignment-client/src/avatars/AvatarMixer.cpp index 2f7c4a83d4..28b8358742 100644 --- a/assignment-client/src/avatars/AvatarMixer.cpp +++ b/assignment-client/src/avatars/AvatarMixer.cpp @@ -132,9 +132,9 @@ void AvatarMixer::processDatagram(const QByteArray& dataByteArray, const HifiSoc // parse positional data from an node nodeList->updateNodeWithData(avatarNode.data(), senderSockAddr, (unsigned char*) dataByteArray.data(), dataByteArray.size()); - } else { - break; + } + break; } case PACKET_TYPE_KILL_NODE: default: diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index fc58d2f169..2f545113bd 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -145,8 +145,6 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : _enableProcessVoxelsThread(true), _voxelProcessor(), _voxelHideShowThread(&_voxels), - _voxelEditSender(this), - _particleEditSender(this), _packetsPerSecond(0), _bytesPerSecond(0), _recentMaxPackets(0), @@ -234,6 +232,10 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : nodeList->addSetOfNodeTypesToNodeInterestSet(QSet() << NODE_TYPE_AUDIO_MIXER << NODE_TYPE_AVATAR_MIXER << NODE_TYPE_VOXEL_SERVER << NODE_TYPE_PARTICLE_SERVER << NODE_TYPE_METAVOXEL_SERVER); + + // connect to the packet sent signal of the _voxelEditSender and the _particleEditSender + connect(&_voxelEditSender, &VoxelEditPacketSender::packetSent, this, &Application::packetSent); + connect(&_particleEditSender, &ParticleEditPacketSender::packetSent, this, &Application::packetSent); // move the silentNodeTimer to the _nodeThread QTimer* silentNodeTimer = new QTimer(); @@ -292,7 +294,7 @@ Application::~Application() { _settings->sync(); // let the avatar mixer know we're out - NodeList::getInstance()->sendKillNode(&NODE_TYPE_AVATAR_MIXER, 1); + NodeList::getInstance()->sendKillNode(QSet() << NODE_TYPE_AVATAR_MIXER); // ask the datagram processing thread to quit and wait until it is done _nodeThread->quit(); @@ -643,21 +645,20 @@ void Application::resetProfile(const QString& username) { } void Application::controlledBroadcastToNodes(unsigned char* broadcastData, size_t dataBytes, - const char* nodeTypes, int numNodeTypes) { - Application* self = getInstance(); - for (int i = 0; i < numNodeTypes; ++i) { - + const QSet& destinationNodeTypes) { + foreach(NODE_TYPE type, destinationNodeTypes) { // Intercept data to voxel server when voxels are disabled - if (nodeTypes[i] == NODE_TYPE_VOXEL_SERVER && !Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) { + if (type == NODE_TYPE_VOXEL_SERVER && !Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) { continue; } - + // Perform the broadcast for one type - int nReceivingNodes = NodeList::getInstance()->broadcastToNodes(broadcastData, dataBytes, & nodeTypes[i], 1); - + int nReceivingNodes = NodeList::getInstance()->broadcastToNodes(broadcastData, dataBytes, + QSet() << type); + // Feed number of bytes to corresponding channel of the bandwidth meter, if any (done otherwise) BandwidthMeter::ChannelIndex channel; - switch (nodeTypes[i]) { + switch (type) { case NODE_TYPE_AGENT: case NODE_TYPE_AVATAR_MIXER: channel = BandwidthMeter::AVATARS; @@ -668,7 +669,7 @@ void Application::controlledBroadcastToNodes(unsigned char* broadcastData, size_ default: continue; } - self->_bandwidthMeter.outputStream(channel).updateValue(nReceivingNodes * dataBytes); + _bandwidthMeter.outputStream(channel).updateValue(nReceivingNodes * dataBytes); } } @@ -1322,15 +1323,13 @@ void Application::wheelEvent(QWheelEvent* event) { } void Application::sendPingPackets() { - - const char nodesToPing[] = {NODE_TYPE_VOXEL_SERVER, NODE_TYPE_PARTICLE_SERVER, - NODE_TYPE_AUDIO_MIXER, NODE_TYPE_AVATAR_MIXER, NODE_TYPE_METAVOXEL_SERVER}; - unsigned char pingPacket[MAX_PACKET_SIZE]; int length = NodeList::getInstance()->fillPingPacket(pingPacket); - getInstance()->controlledBroadcastToNodes(pingPacket, length, - nodesToPing, sizeof(nodesToPing)); + getInstance()->controlledBroadcastToNodes(pingPacket, length, QSet() + << NODE_TYPE_VOXEL_SERVER << NODE_TYPE_PARTICLE_SERVER + << NODE_TYPE_AUDIO_MIXER << NODE_TYPE_AVATAR_MIXER + << NODE_TYPE_METAVOXEL_SERVER); } // Every second, check the frame rates and other stuff @@ -2446,9 +2445,8 @@ void Application::updateAvatar(float deltaTime) { endOfBroadcastStringWrite += _myAvatar.getBroadcastData(endOfBroadcastStringWrite); - const char nodeTypesOfInterest[] = { NODE_TYPE_AVATAR_MIXER }; controlledBroadcastToNodes(broadcastString, endOfBroadcastStringWrite - broadcastString, - nodeTypesOfInterest, sizeof(nodeTypesOfInterest)); + QSet() << NODE_TYPE_AVATAR_MIXER); // Update _viewFrustum with latest camera and view frustum data... // NOTE: we get this from the view frustum, to make it simpler, since the @@ -4052,7 +4050,7 @@ int Application::parseOctreeStats(unsigned char* messageData, ssize_t messageLen return statsMessageLength; } -void Application::packetSentNotification(ssize_t length) { +void Application::packetSent(quint64 length) { _bandwidthMeter.outputStream(BandwidthMeter::VOXELS).updateValue(length); } diff --git a/interface/src/Application.h b/interface/src/Application.h index fb22612ca7..203d74fa82 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -92,7 +92,7 @@ static const float NODE_KILLED_RED = 1.0f; static const float NODE_KILLED_GREEN = 0.0f; static const float NODE_KILLED_BLUE = 0.0f; -class Application : public QApplication, public PacketSenderNotify { +class Application : public QApplication { Q_OBJECT friend class VoxelPacketProcessor; @@ -174,8 +174,8 @@ public: Profile* getProfile() { return &_profile; } void resetProfile(const QString& username); - static void controlledBroadcastToNodes(unsigned char* broadcastData, size_t dataBytes, - const char* nodeTypes, int numNodeTypes); + void controlledBroadcastToNodes(unsigned char* broadcastData, size_t dataBytes, + const QSet& destinationNodeTypes); void setupWorldLight(); @@ -191,9 +191,6 @@ public: void computeOffAxisFrustum(float& left, float& right, float& bottom, float& top, float& nearVal, float& farVal, glm::vec4& nearClipPlane, glm::vec4& farClipPlane) const; - - virtual void packetSentNotification(ssize_t length); - VoxelShader& getVoxelShader() { return _voxelShader; } PointShader& getPointShader() { return _pointShader; } FileLogger* getLogger() { return _logger; } @@ -217,7 +214,8 @@ signals: public slots: void domainChanged(const QString& domainHostname); void nodeKilled(SharedNodePointer node); - + void packetSent(quint64 length); + void exportVoxels(); void importVoxels(); void cutVoxels(); diff --git a/interface/src/Menu.cpp b/interface/src/Menu.cpp index d5e5025d51..c717957da7 100644 --- a/interface/src/Menu.cpp +++ b/interface/src/Menu.cpp @@ -902,7 +902,7 @@ void Menu::goToDomain() { } // send a node kill request, indicating to other clients that they should play the "disappeared" effect - NodeList::getInstance()->sendKillNode(&NODE_TYPE_AVATAR_MIXER, 1); + NodeList::getInstance()->sendKillNode(QSet() << NODE_TYPE_AVATAR_MIXER); // give our nodeList the new domain-server hostname NodeList::getInstance()->setDomainHostname(domainDialog.textValue()); @@ -944,7 +944,7 @@ void Menu::goToLocation() { if (newAvatarPos != avatarPos) { // send a node kill request, indicating to other clients that they should play the "disappeared" effect - NodeList::getInstance()->sendKillNode(&NODE_TYPE_AVATAR_MIXER, 1); + NodeList::getInstance()->sendKillNode(QSet() << NODE_TYPE_AVATAR_MIXER); qDebug("Going To Location: %f, %f, %f...", x, y, z); myAvatar->setPosition(newAvatarPos); diff --git a/interface/src/avatar/Profile.cpp b/interface/src/avatar/Profile.cpp index fee5fbf6fc..dd2b547c47 100644 --- a/interface/src/avatar/Profile.cpp +++ b/interface/src/avatar/Profile.cpp @@ -198,7 +198,7 @@ void Profile::processDataServerResponse(const QString& userString, const QString if (coordinateItems.size() == 3 && orientationItems.size() == 3) { // send a node kill request, indicating to other clients that they should play the "disappeared" effect - NodeList::getInstance()->sendKillNode(&NODE_TYPE_AVATAR_MIXER, 1); + NodeList::getInstance()->sendKillNode(QSet() << NODE_TYPE_AVATAR_MIXER); qDebug() << "Changing domain to" << valueList[i].toLocal8Bit().constData() << ", position to" << valueList[i + 1].toLocal8Bit().constData() << diff --git a/libraries/octree/src/JurisdictionListener.cpp b/libraries/octree/src/JurisdictionListener.cpp index d8686debad..e761a15e76 100644 --- a/libraries/octree/src/JurisdictionListener.cpp +++ b/libraries/octree/src/JurisdictionListener.cpp @@ -15,8 +15,8 @@ #include #include "JurisdictionListener.h" -JurisdictionListener::JurisdictionListener(NODE_TYPE type, PacketSenderNotify* notify) : - _packetSender(notify, JurisdictionListener::DEFAULT_PACKETS_PER_SECOND) +JurisdictionListener::JurisdictionListener(NODE_TYPE type) : + _packetSender(JurisdictionListener::DEFAULT_PACKETS_PER_SECOND) { _nodeType = type; ReceivedPacketProcessor::_dontSleep = true; // we handle sleeping so this class doesn't need to diff --git a/libraries/octree/src/JurisdictionListener.h b/libraries/octree/src/JurisdictionListener.h index c112f43b52..110b2f0d98 100644 --- a/libraries/octree/src/JurisdictionListener.h +++ b/libraries/octree/src/JurisdictionListener.h @@ -27,7 +27,7 @@ public: static const int DEFAULT_PACKETS_PER_SECOND = 1; static const int NO_SERVER_CHECK_RATE = 60; // if no servers yet detected, keep checking at 60fps - JurisdictionListener(NODE_TYPE type = NODE_TYPE_VOXEL_SERVER, PacketSenderNotify* notify = NULL); + JurisdictionListener(NODE_TYPE type = NODE_TYPE_VOXEL_SERVER); virtual bool process(); diff --git a/libraries/octree/src/JurisdictionSender.cpp b/libraries/octree/src/JurisdictionSender.cpp index 521dbdb7e4..e1bbf78506 100644 --- a/libraries/octree/src/JurisdictionSender.cpp +++ b/libraries/octree/src/JurisdictionSender.cpp @@ -16,10 +16,10 @@ #include "JurisdictionSender.h" -JurisdictionSender::JurisdictionSender(JurisdictionMap* map, NODE_TYPE type, PacketSenderNotify* notify) : +JurisdictionSender::JurisdictionSender(JurisdictionMap* map, NODE_TYPE type) : ReceivedPacketProcessor(), _jurisdictionMap(map), - _packetSender(notify, JurisdictionSender::DEFAULT_PACKETS_PER_SECOND) + _packetSender(JurisdictionSender::DEFAULT_PACKETS_PER_SECOND) { _nodeType = type; } diff --git a/libraries/octree/src/JurisdictionSender.h b/libraries/octree/src/JurisdictionSender.h index 287a5dbf61..e70070b21d 100644 --- a/libraries/octree/src/JurisdictionSender.h +++ b/libraries/octree/src/JurisdictionSender.h @@ -26,7 +26,7 @@ class JurisdictionSender : public ReceivedPacketProcessor { public: static const int DEFAULT_PACKETS_PER_SECOND = 1; - JurisdictionSender(JurisdictionMap* map, NODE_TYPE type = NODE_TYPE_VOXEL_SERVER, PacketSenderNotify* notify = NULL); + JurisdictionSender(JurisdictionMap* map, NODE_TYPE type = NODE_TYPE_VOXEL_SERVER); ~JurisdictionSender(); void setJurisdiction(JurisdictionMap* map) { _jurisdictionMap = map; } diff --git a/libraries/octree/src/OctreeEditPacketSender.cpp b/libraries/octree/src/OctreeEditPacketSender.cpp index a3d4e7862b..d4c1051747 100644 --- a/libraries/octree/src/OctreeEditPacketSender.cpp +++ b/libraries/octree/src/OctreeEditPacketSender.cpp @@ -27,8 +27,8 @@ EditPacketBuffer::EditPacketBuffer(PACKET_TYPE type, unsigned char* buffer, ssiz const int OctreeEditPacketSender::DEFAULT_MAX_PENDING_MESSAGES = PacketSender::DEFAULT_PACKETS_PER_SECOND; -OctreeEditPacketSender::OctreeEditPacketSender(PacketSenderNotify* notify) : - PacketSender(notify), +OctreeEditPacketSender::OctreeEditPacketSender() : + PacketSender(), _shouldSend(true), _maxPendingMessages(DEFAULT_MAX_PENDING_MESSAGES), _releaseQueuedMessagesPending(false), diff --git a/libraries/octree/src/OctreeEditPacketSender.h b/libraries/octree/src/OctreeEditPacketSender.h index 9539f309fd..f214796f9d 100644 --- a/libraries/octree/src/OctreeEditPacketSender.h +++ b/libraries/octree/src/OctreeEditPacketSender.h @@ -28,8 +28,9 @@ public: /// Utility for processing, packing, queueing and sending of outbound edit messages. class OctreeEditPacketSender : public PacketSender { + Q_OBJECT public: - OctreeEditPacketSender(PacketSenderNotify* notify = NULL); + OctreeEditPacketSender(); ~OctreeEditPacketSender(); /// Queues a single edit message. Will potentially send a pending multi-command packet. Determines which server diff --git a/libraries/particles/src/ParticleEditPacketSender.h b/libraries/particles/src/ParticleEditPacketSender.h index f142931222..51f0fd9b96 100644 --- a/libraries/particles/src/ParticleEditPacketSender.h +++ b/libraries/particles/src/ParticleEditPacketSender.h @@ -16,10 +16,8 @@ /// Utility for processing, packing, queueing and sending of outbound edit voxel messages. class ParticleEditPacketSender : public OctreeEditPacketSender { + Q_OBJECT public: - ParticleEditPacketSender(PacketSenderNotify* notify = NULL) : OctreeEditPacketSender(notify) { } - ~ParticleEditPacketSender() { } - /// Send particle add message immediately /// NOTE: ParticleProperties assumes that all distances are in meter units void sendEditParticleMessage(PACKET_TYPE type, ParticleID particleID, const ParticleProperties& properties); diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp index a1c1f602fb..f77b428764 100644 --- a/libraries/script-engine/src/ScriptEngine.cpp +++ b/libraries/script-engine/src/ScriptEngine.cpp @@ -250,7 +250,7 @@ void ScriptEngine::run() { int numAvatarPacketBytes = _avatarData->getBroadcastData(avatarPacket + numAvatarHeaderBytes) + numAvatarHeaderBytes; - nodeList->broadcastToNodes(avatarPacket, numAvatarPacketBytes, &NODE_TYPE_AVATAR_MIXER, 1); + nodeList->broadcastToNodes(avatarPacket, numAvatarPacketBytes, QSet() << NODE_TYPE_AVATAR_MIXER); } if (willSendVisualDataCallBack) { diff --git a/libraries/shared/src/GenericThread.cpp b/libraries/shared/src/GenericThread.cpp index a2dcf1004d..186366c606 100644 --- a/libraries/shared/src/GenericThread.cpp +++ b/libraries/shared/src/GenericThread.cpp @@ -20,7 +20,10 @@ GenericThread::GenericThread() : } GenericThread::~GenericThread() { - terminate(); + // we only need to call terminate() if we're actually threaded and still running + if (isStillRunning() && isThreaded()) { + terminate(); + } } void GenericThread::initialize(bool isThreaded) { @@ -45,6 +48,7 @@ void GenericThread::terminate() { if (_thread) { _thread->wait(); _thread->deleteLater(); + _thread = NULL; } } } diff --git a/libraries/shared/src/NodeList.cpp b/libraries/shared/src/NodeList.cpp index edffc127c0..3107d4e620 100644 --- a/libraries/shared/src/NodeList.cpp +++ b/libraries/shared/src/NodeList.cpp @@ -56,7 +56,7 @@ NodeList* NodeList::getInstance() { NodeList::NodeList(char newOwnerType, unsigned short int newSocketListenPort) : _nodeHash(), - _nodeHashMutex(), + _nodeHashMutex(QMutex::Recursive), _domainHostname(DEFAULT_DOMAIN_HOSTNAME), _domainSockAddr(HifiSockAddr(QHostAddress::Null, DEFAULT_DOMAIN_SERVER_PORT)), _nodeSocket(this), @@ -233,7 +233,7 @@ int NodeList::updateNodeWithData(Node *node, const HifiSockAddr& senderSockAddr, node->setLastHeardMicrostamp(usecTimestampNow()); - if (!senderSockAddr.isNull()) { + if (!senderSockAddr.isNull() && !node->getActiveSocket()) { if (senderSockAddr == node->getPublicSocket()) { node->activatePublicSocket(); } else if (senderSockAddr == node->getLocalSocket()) { @@ -460,7 +460,7 @@ NodeHash::iterator NodeList::killNodeAtHashIterator(NodeHash::iterator& nodeItem return _nodeHash.erase(nodeItemToKill); } -void NodeList::sendKillNode(const char* nodeTypes, int numNodeTypes) { +void NodeList::sendKillNode(const QSet& destinationNodeTypes) { unsigned char packet[MAX_PACKET_SIZE]; unsigned char* packetPosition = packet; @@ -470,7 +470,7 @@ void NodeList::sendKillNode(const char* nodeTypes, int numNodeTypes) { memcpy(packetPosition, rfcUUID.constData(), rfcUUID.size()); packetPosition += rfcUUID.size(); - broadcastToNodes(packet, packetPosition - packet, nodeTypes, numNodeTypes); + broadcastToNodes(packet, packetPosition - packet, destinationNodeTypes); } void NodeList::processKillNode(unsigned char* packetData, size_t dataBytes) { @@ -733,12 +733,13 @@ SharedNodePointer NodeList::addOrUpdateNode(const QUuid& uuid, char nodeType, } } -unsigned NodeList::broadcastToNodes(unsigned char* broadcastData, size_t dataBytes, const char* nodeTypes, int numNodeTypes) { +unsigned NodeList::broadcastToNodes(unsigned char* broadcastData, size_t dataBytes, + const QSet& destinationNodeTypes) { unsigned n = 0; foreach (const SharedNodePointer& node, getNodeHash()) { // only send to the NodeTypes we are asked to send to. - if (memchr(nodeTypes, node->getType(), numNodeTypes)) { + if (destinationNodeTypes.contains(node->getType())) { if (getNodeActiveSocketOrPing(node.data())) { // we know which socket is good for this node, send there _nodeSocket.writeDatagram((char*) broadcastData, dataBytes, diff --git a/libraries/shared/src/NodeList.h b/libraries/shared/src/NodeList.h index 2143ae87eb..13f9485069 100644 --- a/libraries/shared/src/NodeList.h +++ b/libraries/shared/src/NodeList.h @@ -90,6 +90,7 @@ public: void reset(); + const QSet& getNodeInterestSet() const { return _nodeTypesOfInterest; } void addNodeTypeToInterestSet(NODE_TYPE nodeTypeToAdd); void addSetOfNodeTypesToNodeInterestSet(const QSet& setOfNodeTypes); @@ -104,7 +105,7 @@ public: int fillPingReplyPacket(unsigned char* pingBuffer, unsigned char* replyBuffer); void pingPublicAndLocalSocketsForInactiveNode(Node* node); - void sendKillNode(const char* nodeTypes, int numNodeTypes); + void sendKillNode(const QSet& destinationNodeTypes); SharedNodePointer nodeWithAddress(const HifiSockAddr& senderSockAddr); SharedNodePointer nodeWithUUID(const QUuid& nodeUUID); @@ -116,7 +117,7 @@ public: int updateNodeWithData(Node *node, const HifiSockAddr& senderSockAddr, unsigned char *packetData, int dataBytes); - unsigned broadcastToNodes(unsigned char *broadcastData, size_t dataBytes, const char* nodeTypes, int numNodeTypes); + unsigned broadcastToNodes(unsigned char *broadcastData, size_t dataBytes, const QSet& destinationNodeTypes); SharedNodePointer soloNodeOfType(char nodeType); void loadData(QSettings* settings); diff --git a/libraries/shared/src/PacketSender.cpp b/libraries/shared/src/PacketSender.cpp index ce720bf447..52274d9e9c 100644 --- a/libraries/shared/src/PacketSender.cpp +++ b/libraries/shared/src/PacketSender.cpp @@ -27,13 +27,12 @@ const int PacketSender::MINIMAL_SLEEP_INTERVAL = (USECS_PER_SECOND / TARGET_FPS) const int AVERAGE_CALL_TIME_SAMPLES = 10; -PacketSender::PacketSender(PacketSenderNotify* notify, int packetsPerSecond) : +PacketSender::PacketSender(int packetsPerSecond) : _packetsPerSecond(packetsPerSecond), _usecsPerProcessCallHint(0), _lastProcessCallTime(0), _averageProcessCallTime(AVERAGE_CALL_TIME_SAMPLES), _lastSendTime(0), // Note: we set this to 0 to indicate we haven't yet sent something - _notify(notify), _lastPPSCheck(0), _packetsOverCheckInterval(0), _started(usecTimestampNow()), @@ -271,10 +270,9 @@ bool PacketSender::nonThreadedProcess() { _packetsOverCheckInterval++; _totalPacketsSent++; _totalBytesSent += temporary.getLength(); - - if (_notify) { - _notify->packetSentNotification(temporary.getLength()); - } + + emit packetSent(temporary.getLength()); + _lastSendTime = now; } return isStillRunning(); diff --git a/libraries/shared/src/PacketSender.h b/libraries/shared/src/PacketSender.h index 7a2c6e6d2a..4d87a62e5a 100644 --- a/libraries/shared/src/PacketSender.h +++ b/libraries/shared/src/PacketSender.h @@ -15,15 +15,9 @@ #include "NetworkPacket.h" #include "SharedUtil.h" -/// Notification Hook for packets being sent by a PacketSender -class PacketSenderNotify { -public: - virtual void packetSentNotification(ssize_t length) = 0; -}; - - /// Generalized threaded processor for queueing and sending of outbound packets. class PacketSender : public GenericThread { + Q_OBJECT public: static const uint64_t USECS_PER_SECOND; @@ -35,7 +29,7 @@ public: static const int MINIMUM_PACKETS_PER_SECOND; static const int MINIMAL_SLEEP_INTERVAL; - PacketSender(PacketSenderNotify* notify = NULL, int packetsPerSecond = DEFAULT_PACKETS_PER_SECOND); + PacketSender(int packetsPerSecond = DEFAULT_PACKETS_PER_SECOND); ~PacketSender(); /// Add packet to outbound queue. @@ -48,9 +42,6 @@ public: void setPacketsPerSecond(int packetsPerSecond); int getPacketsPerSecond() const { return _packetsPerSecond; } - void setPacketSenderNotify(PacketSenderNotify* notify) { _notify = notify; } - PacketSenderNotify* getPacketSenderNotify() const { return _notify; } - virtual bool process(); /// are there packets waiting in the send queue to be sent @@ -97,7 +88,8 @@ public: /// returns the total bytes queued by this object over its lifetime uint64_t getLifetimeBytesQueued() const { return _totalBytesQueued; } - +signals: + void packetSent(quint64); protected: int _packetsPerSecond; int _usecsPerProcessCallHint; @@ -107,7 +99,6 @@ protected: private: std::vector _packets; uint64_t _lastSendTime; - PacketSenderNotify* _notify; bool threadedProcess(); bool nonThreadedProcess(); diff --git a/libraries/voxels/src/VoxelEditPacketSender.h b/libraries/voxels/src/VoxelEditPacketSender.h index d0ce018d95..ec9b74dff8 100644 --- a/libraries/voxels/src/VoxelEditPacketSender.h +++ b/libraries/voxels/src/VoxelEditPacketSender.h @@ -15,10 +15,8 @@ /// Utility for processing, packing, queueing and sending of outbound edit voxel messages. class VoxelEditPacketSender : public OctreeEditPacketSender { + Q_OBJECT public: - VoxelEditPacketSender(PacketSenderNotify* notify = NULL) : OctreeEditPacketSender(notify) { } - ~VoxelEditPacketSender() { } - /// Send voxel edit message immediately void sendVoxelEditMessage(PACKET_TYPE type, VoxelDetail& detail);