sdlNetAllocPacketV function
Allocate a UDP packet vector (array of packets).
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.
\param howmany the number of packets to allocate. \param size the maximum bytes of payload each packet should contain. \returns a pointer to the first packet in the array, or NULL if the function ran out of memory.
\since This function is available since SDL_net 2.0.0.
\sa SDLNet_FreePacketV
extern DECLSPEC UDPpacket ** SDLCALL SDLNet_AllocPacketV(int howmany, int size)
Implementation
Pointer<Pointer<UDPpacket>> sdlNetAllocPacketV(int howmany, int size) {
final sdlNetAllocPacketVLookupFunction = libSdl2Net.lookupFunction<
Pointer<Pointer<UDPpacket>> Function(Int32 howmany, Int32 size),
Pointer<Pointer<UDPpacket>> Function(
int howmany, int size)>('SDLNet_AllocPacketV');
return sdlNetAllocPacketVLookupFunction(howmany, size);
}