From 95f401fa0f5e3c481e3b58e4f62fac16593410b1 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Wed, 15 Jul 2015 11:00:33 -0700 Subject: [PATCH] add comments to Packet methods --- libraries/networking/src/udt/Packet.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/networking/src/udt/Packet.h b/libraries/networking/src/udt/Packet.h index 343bb3f858..0ed02d28ee 100644 --- a/libraries/networking/src/udt/Packet.h +++ b/libraries/networking/src/udt/Packet.h @@ -49,9 +49,13 @@ public: PacketVersion getVersion() const { return _version; } + // Returns the size of the packet, including the header qint64 getDataSize() const { return totalHeadersSize() + getPayloadSize(); } + // Returns the size of the payload only qint64 getPayloadSize() const { return _payloadSize; } + + // Allows a writer to change the size of the payload used when writing directly void setPayloadSize(qint64 payloadSize); qint64 getPayloadCapacity() const { return _payloadCapacity; }