Hello Mike, Mike Diehl a écrit :
switch (event.type) { case ENET_EVENT_TYPE_RECEIVE:// XXX Are we really going to do a memcpy here? memcpy(P, event.packet->data, event.packet->dataLength); break; }How do I convert the EnetPacket* to a void* without simply copying it to a char[]?
Well, event.packet->data *IS* a void*, you don't have to copy it if you're that concerned about performance and can just process the data in place. By the way, you will have to call enet_packet_destroy(packet) once you're done processing packet data.
Cheers, -- Emmanuel
<<attachment: emmanuel_raulo.vcf>>
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
