[so] Case study - Optiunea -fpack-struct
Alexandru Mosoi
brtzsnr at gmail.com
Sun Dec 9 22:45:04 EET 2007
salut.
eu cred ca modul tau de abordare a fost gresit. pentru a transmite o
structura pe fir nu faci memcpy(buffer, obiect, sizeof(obiect)) ci foloseste
o tehnica numita Serialization [1]. presupun ca stii despre ce este vorba,
dar pentru cine nu stie: serialization presupune folosirea unor functii care
transforma structura ta intr-un sir de bytes si invers. pentru
corectitudine, aceste functii presupun si folosirea functiilor hton*() si
ntoh*().
[1] http://en.wikipedia.org/wiki/Serialization
--
Alexandru Moşoi
http://alexandru.mosoi.googlepages.com
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20071209/ff7fea80/attachment-0001.html
More information about the so
mailing list