aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authoreihrul <eihrul>2006-10-03 15:39:29 +0000
committereihrul <eihrul>2006-10-03 15:39:29 +0000
commitdf636cc8f79fac3c665a9740c5803ee71f965d16 (patch)
tree9b560f452585ee7990455c1f288f22782ca886c2 /include
parente310eade3b48d3112fe9dcf99548c8c7bf2895e8 (diff)
downloadenet-df636cc8f79fac3c665a9740c5803ee71f965d16.tar.gz
enet-df636cc8f79fac3c665a9740c5803ee71f965d16.zip
*** empty log message ***
Diffstat (limited to 'include')
-rw-r--r--include/enet/enet.h12
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