[ENet-discuss] Sending a struct which contains a pointer to arbitrary data...

Daniel Aquino mr.danielaquino at gmail.com
Thu Apr 2 11:59:46 PDT 2009


I currently have something similar too:

struct packet {
       enum packet_type type;
       void* data;
} packet;

I assign this to the ENetPacket->data but as you all probably know the
(void*) pointer address is sent in the packet and not the data that
the pointer reflects...

I need a method to send the "type" and different types of data...

In one instance data might reflect a char* or could be an ENetAddress etc...

Any advice on how I should be approaching this?

Thanks!


More information about the ENet-discuss mailing list