Receive into a UDPpacket vector
the number of packets received. 0 is returned when no packets are received. -1 is returned on errors.
Binds to C-function call in SDL_net.h:
extern DECLSPEC int SDLCALL SDLNet_UDP_RecvV(UDPsocket sock, UDPpacket **packets)
// try to receive some waiting udp packets //UDPsocket udpsock; //UDPpacket **packetV; int numrecv, i; numrecv=SDLNet_UDP_RecvV(udpsock, &packetV); if(numrecv==-1) { // handle error, perhaps just print out the SDL_GetError string. } for(i=0; i<numrecv; i++) { // do something with packetV[i] }
SdlNet Class | Tao.Sdl Namespace | SDLNet_UDP_Bind | SDLNet_UDP_Send | SDLNet_UDP_SendV | SDLNet_UDP_Recv | SdlNet.UDPpacket | SdlNet.UDPsocket