Utility for processing, packing, queueing and sending of outbound edit voxel messages. More...
#include <EntityEditPacketSender.h>
Public Member Functions | |
void | queueEditEntityMessage (PacketType type, EntityTreePointer entityTree, EntityItemID entityItemID, const EntityItemProperties &properties) |
Public Member Functions inherited from OctreeEditPacketSender | |
void | queueOctreeEditMessage (PacketType type, QByteArray &editMessage) |
void | releaseQueuedMessages () |
virtual bool | process () override |
if you're running in non-threaded mode, you must call this method regularly More... | |
void | setMaxPendingMessages (int maxPendingMessages) |
Public Member Functions inherited from PacketSender | |
void | queuePacketForSending (const SharedNodePointer &destinationNode, std::unique_ptr< NLPacket > packet) |
Add packet to outbound queue. | |
bool | hasPacketsToSend () const |
are there packets waiting in the send queue to be sent | |
size_t | packetsToSendCount () const |
how many packets are there in the send queue waiting to be sent | |
void | setProcessCallIntervalHint (int usecsPerProcessCall) |
float | getLifetimePPS () const |
returns the packets per second send rate of this object over its lifetime | |
float | getLifetimeBPS () const |
returns the bytes per second send rate of this object over its lifetime | |
float | getLifetimePPSQueued () const |
returns the packets per second queued rate of this object over its lifetime | |
float | getLifetimeBPSQueued () const |
returns the bytes per second queued rate of this object over its lifetime | |
quint64 | getLifetimeInUsecs () const |
returns lifetime of this object from first packet sent to now in usecs | |
float | getLifetimeInSeconds () const |
returns lifetime of this object from first packet sent to now in usecs | |
quint64 | getLifetimePacketsSent () const |
returns the total packets sent by this object over its lifetime | |
quint64 | getLifetimeBytesSent () const |
returns the total bytes sent by this object over its lifetime | |
quint64 | getLifetimePacketsQueued () const |
returns the total packets queued by this object over its lifetime | |
quint64 | getLifetimeBytesQueued () const |
returns the total bytes queued by this object over its lifetime | |
Public Member Functions inherited from GenericThread | |
void | initialize (bool isThreaded=true, QThread::Priority priority=QThread::NormalPriority) |
void | terminate () |
Call to stop 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. | |
Protected Member Functions inherited from GenericThread | |
void | lock () |
Locks all the resources of the thread. | |
void | unlock () |
Unlocks all the resources of the thread. | |
Utility for processing, packing, queueing and sending of outbound edit voxel messages.
void EntityEditPacketSender::queueEditEntityMessage | ( | PacketType | type, |
EntityTreePointer | entityTree, | ||
EntityItemID | entityItemID, | ||
const EntityItemProperties & | properties | ||
) |
Queues an array of several voxel edit messages. Will potentially send a pending multi-command packet. Determines which voxel-server node or nodes the packet should be sent to. Can be called even before voxel servers are known, in which case up to MaxPendingMessages will be buffered and processed when voxel servers are known. NOTE: EntityItemProperties assumes that all distances are in meter units