[ndnSIM] How to print data size?

Alex Afanasyev alexander.afanasyev at ucla.edu
Thu Feb 5 17:40:49 PST 2015


> On Feb 5, 2015, at 5:30 PM, 최원준 <wonjunchoi001 at gmail.com> wrote:
> 
> contentObject->wireEncode().size() returns 1058 when payload of producer is 1024.
> I set (window size is 1, maxseq is 100) with ndn-simple example.
> I don't know why the size is different. The unit of size is byte, right?

"contentObject->wireEncode().size()"  returns size of the whole data packet with all headers and additional fields (e.g., signature).  If you want to have just payload, then:

contentObject->getPayload().value_size()

—
Alex

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150205/a494f39e/attachment.bin>


More information about the ndnSIM mailing list