clarify Header::Deserialize documentation
authorTom Henderson <tomh@tomh.org>
Fri, 12 Sep 2014 17:49:06 -0700
changeset 10941 b8fb2bd84f08
parent 10940 e51c1aaac703
child 10942 2011df8ec4f6
clarify Header::Deserialize documentation
src/network/model/header.h
--- a/src/network/model/header.h	Fri Sep 12 17:34:43 2014 -0700
+++ b/src/network/model/header.h	Fri Sep 12 17:49:06 2014 -0700
@@ -70,7 +70,7 @@
   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 @@
    * 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;
   /**