#pragma once #include class UDPpacketVBuffer { int npackets; UDPpacket** packetV; public: UDPpacketVBuffer (UDPpacket* src, const void* buf, const size_t size); ~UDPpacketVBuffer (void) { if (packetV) { SDLNet_FreePacketV (packetV); packetV = NULL; } } int Send (UDPsocket sock) { int numsent; numsent = SDLNet_UDP_SendV (sock, packetV, npackets); return numsent; } };