<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">this is related to properly encoding/decoding the payload of your data packets.</div><div class=""><br class=""></div><div class="">There are a few examples of encoding/decoding you can refer to:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/spirosmastorakis/nTorrent/blob/master/src/torrent-file.cpp#L97" class="">https://github.com/spirosmastorakis/nTorrent/blob/master/src/torrent-file.cpp#L97</a></div><div class=""><a href="https://github.com/spirosmastorakis/nTorrent/blob/master/src/torrent-file.cpp#L158" class="">https://github.com/spirosmastorakis/nTorrent/blob/master/src/torrent-file.cpp#L158</a></div><div class=""><a href="https://github.com/spirosmastorakis/nTorrent/blob/master/src/file-manifest.cpp#L147" class="">https://github.com/spirosmastorakis/nTorrent/blob/master/src/file-manifest.cpp#L147</a></div><div class=""><a href="https://github.com/spirosmastorakis/nTorrent/blob/master/src/file-manifest.cpp#L253" class="">https://github.com/spirosmastorakis/nTorrent/blob/master/src/file-manifest.cpp#L253</a></div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div><div class=""><br class=""></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Sep 13, 2018, at 2:15 AM, mengxue <<a href="mailto:mengxue_1224@126.com" class="">mengxue_1224@126.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="line-height: 1.7; font-size: 14px; font-family: Arial;" class=""><div class="">Hi,all</div><div class="">   I am new in ndnSIM and met with some problems recently.</div><div class="">   Assume that I defined a class " Student " and want to attach an instantiation named " newStudent " of  the "Student" class as the payload of a Data packet.</div><div class="">   I wonder what should I do to set this instantiation as the payload of the Data packet so that  in other nodes  I can get the payload just as what it originally is,i.e.,"newStudent" , so that I can do some operations on the "newStudent".</div><div class="">I have tried on the API documentation but not found the solutions using "Data::setpayload()" and "Data::getpayload()".</div><div class="">  Thank you very much!</div><div class="">  Best regards,</div><div class="">  Xin Zhang</div></div></div></blockquote></div><br class=""></div></div></body></html>