I'm starting a multiplayer game, but the examples show passing a NSData object that was created using a structure. With ARC though, I can't use C structures. (correct?) It seems that I'm supposed to use objects instead of C structures using ARC. But how do I send NSData packets of objects?
I guess I could hard code a big byte array, but it seems like there should be an easier way.
Also, if it is possible to send an object, how do I send multiple objects and be able to differentiate between the ones I send?
Thanks!
The answer to my question was to use a NSKeyedArchiver. It allows one to pack an object (or anything) into a NSData object.