Overte C++ Documentation
OctreeInboundPacketProcessor Class Reference

#include <OctreeInboundPacketProcessor.h>

Inheritance diagram for OctreeInboundPacketProcessor:
Collaboration diagram for OctreeInboundPacketProcessor:

Protected Member Functions

virtual void processPacket (QSharedPointer< ReceivedMessage > message, SharedNodePointer sendingNode) override
 
virtual uint32_t getMaxWait () const override
 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
 Override to do work before the packets processing loop. Default does nothing.
 
virtual void midProcess () override
 Override to do work inside the packet processing loop after a packet is processed. Default does nothing.
 
- Protected Member Functions inherited from ReceivedPacketProcessor
virtual bool process () override
 Implements generic processing behavior for this thread.
 
virtual void postProcess ()
 Override to do work after the packets processing loop. Default does nothing.
 
- Protected Member Functions inherited from GenericThread
void lock ()
 Locks all the resources of the thread.
 
void unlock ()
 Unlocks all the resources of the thread.
 

Additional Inherited Members

- Public Slots inherited from GenericThread
void threadRoutine ()
 If you're running in non-threaded mode, you must call this regularly.
 
- Public Member Functions inherited from ReceivedPacketProcessor
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.
 
- Public Member Functions inherited from GenericThread
void initialize (bool isThreaded=true, QThread::Priority priority=QThread::NormalPriority)
 
void terminate ()
 Call to stop the thread.
 

Detailed Description

Handles processing of incoming network packets for the octee servers. As with other ReceivedPacketProcessor classes the user is responsible for reading inbound packets and adding them to the processing queue by calling queueReceivedPacket()

Member Function Documentation

◆ processPacket()

void OctreeInboundPacketProcessor::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: