Allocate a vector of UDPpackets
a pointer to a new empty UDPpacket vector. NULL is returned on errors, such as out-of-memory.
Binds to C-function call in SDL_net.h:
extern DECLSPEC UDPpacket ** SDLCALL SDLNet_AllocPacketV(int howmany, int size)
// create a new UDPpacket vector to hold 1024 bytes of data in 10 packets UDPpacket **packetV; packetV=SDLNet_AllocPacketV(10, 1024); if(!packetV) { printf("SDLNet_AllocPacketV: %s\n", SDLNet_GetError()); // perhaps do something else since you can't make this packet } else { // do stuff with this new packet vector // SDLNet_FreePacketV this packet vector when finished with it }
SdlNet Class | Tao.Sdl Namespace | SdlNet.UDPpacket | SdlNet.IPaddress | SDLNet_AllocPacketV | SDLNet_ResizePacket | SDLNet_FreePacket | SDLNet_UDP_Send | SDLNet_UDP_SendV