ENet v1.3.17
Reliable UDP networking library
|
ENet packet structure. More...
#include <enet.h>
Data Fields | |
enet_uint8 * | data |
allocated data for packet More... | |
size_t | dataLength |
length of data More... | |
enet_uint32 | flags |
bitwise-or of ENetPacketFlag constants More... | |
ENetPacketFreeCallback | freeCallback |
function to be called when the packet is no longer in use More... | |
size_t | referenceCount |
internal use only More... | |
void * | userData |
application private data, may be freely modified More... | |
ENet packet structure.
An ENet data packet that may be sent to or received from a peer. The shown fields should only be read and never modified. The data field contains the allocated data for the packet. The dataLength fields specifies the length of the allocated data. The flags field is either 0 (specifying no flags), or a bitwise-or of any combination of the following flags:
ENET_PACKET_FLAG_RELIABLE - packet must be received by the target peer and resend attempts should be made until the packet is delivered
ENET_PACKET_FLAG_UNSEQUENCED - packet will not be sequenced with other packets (not supported for reliable packets)
ENET_PACKET_FLAG_NO_ALLOCATE - packet will not allocate data, and user must supply it instead
ENET_PACKET_FLAG_UNRELIABLE_FRAGMENT - packet will be fragmented using unreliable (instead of reliable) sends if it exceeds the MTU
ENET_PACKET_FLAG_SENT - whether the packet has been sent from all queues it has been entered into
enet_uint8* ENetPacket::data |
allocated data for packet
size_t ENetPacket::dataLength |
length of data
enet_uint32 ENetPacket::flags |
bitwise-or of ENetPacketFlag constants
ENetPacketFreeCallback ENetPacket::freeCallback |
function to be called when the packet is no longer in use
size_t ENetPacket::referenceCount |
internal use only
void* ENetPacket::userData |
application private data, may be freely modified