I have the following struct:
typedef enum
{
kPacketTypeJoin = 1,
kPacketTypeServerAcceptedJoin,
kPacketTypeSelectedNumber,
} PacketTypes;
typedef struct
{
PacketTypes type;
NSString *name;
} PacketJoin;
how would I convert a PacketJoin into NSData and back to PacketJoin again?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…