ENet packet functions


Functions

ENetPacketenet_packet_create (const void *data, size_t dataLength, enet_uint32 flags)
 Creates a packet that may be sent to a peer.
void enet_packet_destroy (ENetPacket *packet)
 Destroys the packet and deallocates its data.
int enet_packet_resize (ENetPacket *packet, size_t dataLength)
 Attempts to resize the data in the packet to length specified in the dataLength parameter.
enet_uint32 enet_crc32 (const ENetBuffer *buffers, size_t bufferCount)

Function Documentation

ENetPacket* enet_packet_create ( const void *  data,
size_t  dataLength,
enet_uint32  flags 
)

Parameters:
dataContents initial contents of the packet's data; the packet's data will remain uninitialized if dataContents is NULL.
dataLength size of the data allocated for this packet
flags flags for this packet as described for the ENetPacket structure.
Returns:
the packet on success, NULL on failure

References ENET_PACKET_FLAG_NO_ALLOCATE.

void enet_packet_destroy ( ENetPacket packet  ) 

Parameters:
packet packet to be destroyed

References ENET_PACKET_FLAG_NO_ALLOCATE.

Referenced by enet_host_broadcast().

int enet_packet_resize ( ENetPacket packet,
size_t  dataLength 
)

Parameters:
packet packet to resize
dataLength new size for the packet data
Returns:
0 on success, < 0 on failure

References ENET_PACKET_FLAG_NO_ALLOCATE.


Generated on Thu Apr 30 04:21:00 2009 for enet by  doxygen 1.5.8