diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/enet/enet.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/enet/enet.h b/include/enet/enet.h index 24f6ef9..a19640f 100644 --- a/include/enet/enet.h +++ b/include/enet/enet.h @@ -85,6 +85,9 @@ typedef enum ENET_PACKET_FLAG_NO_ALLOCATE = (1 << 2) } ENetPacketFlag; +struct _ENetPacket; +typedef void (ENET_CALLBACK * ENetPacketFreeCallback) (struct _ENetPacket *); + /** * ENet packet structure. * @@ -101,10 +104,11 @@ typedef enum */ typedef struct _ENetPacket { - size_t referenceCount; /**< internal use only */ - enet_uint32 flags; /**< bitwise or of ENetPacketFlag constants */ - enet_uint8 * data; /**< allocated data for packet */ - size_t dataLength; /**< length of data */ + size_t referenceCount; /**< internal use only */ + enet_uint32 flags; /**< bitwise or of ENetPacketFlag constants */ + enet_uint8 * data; /**< allocated data for packet */ + size_t dataLength; /**< length of data */ + ENetPacketFreeCallback freeCallback; /**< function to be called when the packet is no longer in use */ } ENetPacket; typedef struct _ENetAcknowledgement |