#include <OctreePacketProcessor.h>
|
virtual void | processPacket (QSharedPointer< ReceivedMessage > message, SharedNodePointer sendingNode) override |
|
virtual bool | process () override |
| Implements generic processing behavior for this thread.
|
|
virtual uint32_t | getMaxWait () const |
| Determines the timeout of the wait when there are no packets to process. Default value is 100ms to allow for regular event processing.
|
|
virtual void | preProcess () |
| Override to do work before the packets processing loop. Default does nothing.
|
|
virtual void | midProcess () |
| Override to do work inside the packet processing loop after a packet is processed. Default does nothing.
|
|
virtual void | postProcess () |
| Override to do work after the packets processing loop. Default does nothing.
|
|
void | lock () |
| Locks all the resources of the thread.
|
|
void | unlock () |
| Unlocks all the resources of the thread.
|
|
|
void | threadRoutine () |
| If you're running in non-threaded mode, you must call this regularly.
|
|
void | queueReceivedPacket (QSharedPointer< ReceivedMessage > message, SharedNodePointer sendingNode) |
| Add packet from network receive thread to the processing queue.
|
|
bool | hasPacketsToProcess () const |
| Are there received packets waiting to be processed.
|
|
bool | isAlive (const QUuid &nodeUUID) const |
| Is a specified node still alive?
|
|
bool | hasPacketsToProcessFrom (const SharedNodePointer &sendingNode) const |
| Are there received packets waiting to be processed from a specified node.
|
|
bool | hasPacketsToProcessFrom (const QUuid &nodeUUID) const |
| Are there received packets waiting to be processed from a specified node.
|
|
int | packetsToProcessCount () const |
| How many received packets waiting are to be processed.
|
|
void | initialize (bool isThreaded=true, QThread::Priority priority=QThread::NormalPriority) |
|
void | terminate () |
| Call to stop the thread.
|
|
Handles processing of incoming voxel packets for the interface application. As with other ReceivedPacketProcessor classes the user is responsible for reading inbound packets and adding them to the processing queue by calling queueReceivedPacket()
◆ processPacket()
void OctreePacketProcessor::processPacket |
( |
QSharedPointer< ReceivedMessage > |
message, |
|
|
SharedNodePointer |
sendingNode |
|
) |
| |
|
overrideprotectedvirtual |
Callback for processing of recieved packets. Implement this to process the incoming packets.
- Parameters
-
SharedNodePointer& | sendingNode the node that sent this packet |
QByteArray& | the packet to be processed |
Implements ReceivedPacketProcessor.
The documentation for this class was generated from the following files: