Resize the data buffer in a UDPpacket
the new size of the data in the packet. If the number returned is less than what you asked for, that's an error.
Binds to C-function call in SDL_net.h:
extern DECLSPEC int SDLCALL SDLNet_ResizePacket(UDPpacket *packet, int newsize)
// Resize a UDPpacket to hold 2048 bytes of data //UDPpacket *packet; int newsize; newsize=SDLNet_ResizePacket(packet, 2048); if(newsize<2048) { printf("SDLNet_ResizePacket: %s\n", SDLNet_GetError()); // perhaps do something else since you didn't get the buffer you wanted } else { // do stuff with the resized packet }
SdlNet Class | Tao.Sdl Namespace | SdlNet.UDPpacket | SDLNet_AllocPacket | SDLNet_AllocPacketV | SDLNet_FreePacket