SDL Wiki
(This function is part of SDL_net, a separate library from SDL.)


Allocate a UDP packet vector (array of packets).


UDPpacket ** SDLNet_AllocPacketV(int howmany, int size);

Function Parameters

howmany the number of packets to allocate.
size the maximum bytes of payload each packet should contain.

Return Value

Returns a pointer to the first packet in the array, or NULL if the function ran out of memory.


This allocates howmany packets at once, each size bytes long.

You must free the results of this function with SDLNet_FreePacketV, and must not free individual packets from this function with SDLNet_FreePacket.


This function is available since SDL_net 2.0.0.


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.