[ENet-discuss] Added packet destroyed callback to CVS
    Lee Salzman 
    lsalzman1 at cox.net
       
    Tue Oct  3 08:51:32 PDT 2006
    
    
  
Hi,
	For those who were asking for it, I added a callback that gets called 
on a packet once it has been destroyed by ENet... because, uh, I needed 
it too. ;) The intended usage is to combine with 
ENET_PACKET_FLAG_NO_ALLOCATE, although there is no requirement that they 
must be used together. This is in CVS only.
	Relevant details:
typedef void (* ENetPacketFreeCallback) (ENetPacket *);
Example use:
	void yourCallbackHere (ENetPacket * packet)
	{
		/* do stuff with packet->data here */
	}
	ENetPacket * packet = enet_packet_create(...);
	packet -> freeCallback = yourCallbackHere;
That's all there is to it.
Lee
    
    
More information about the ENet-discuss
mailing list