From 4394d1d4ba05693af7e81e8627fac0f0ff2495e4 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Fri, 12 Sep 2014 17:49:06 -0700 Subject: [PATCH] clarify Header::Deserialize documentation --- src/network/model/header.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/network/model/header.h b/src/network/model/header.h index 35f34dd7b..aab021a95 100644 --- a/src/network/model/header.h +++ b/src/network/model/header.h @@ -70,7 +70,7 @@ public: virtual void Serialize (Buffer::Iterator start) const = 0; /** * \param start an iterator which points to where the header should - * written. + * read from. * \returns the number of bytes read. * * This method is used by Packet::RemoveHeader to @@ -78,6 +78,12 @@ public: * The data read is expected to * match bit-for-bit the representation of this header in real * networks. + * + * Note that data is not actually removed from the buffer to + * which the iterator points. Both Packet::RemoveHeader() and + * Packet::PeekHeader() call Deserialize(), but only the RemoveHeader() + * has additional statements to remove the header bytes from the + * underlying buffer and associated metadata. */ virtual uint32_t Deserialize (Buffer::Iterator start) = 0; /**