summaryrefslogtreecommitdiff
path: root/src/packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/packet.h')
-rw-r--r--src/packet.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/packet.h b/src/packet.h
index 4e1d48c5..6b276808 100644
--- a/src/packet.h
+++ b/src/packet.h
@@ -26,6 +26,9 @@
/**
* A packet wraps a certain amount of bytes for sending and receiving.
+ *
+ * NOTE: For performance enhancements this class could allocate extra memory
+ * in advance instead of expanding size every time more data is added.
*/
class Packet
{
@@ -40,8 +43,16 @@ class Packet
*/
~Packet();
+ /**
+ * Expand the packet size
+ */
+ void expand(unsigned int bytes);
+
char *data; /**< Packet data */
unsigned int length; /**< Length of data in bytes */
+
+ private:
+ unsigned int size; /**< Size of data */
};
#endif