[gameprogrammer] again on udp and sdl_net
- From: Roger D Vargas <luo_hei@xxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Fri, 12 Aug 2005 13:14:34 -0400
After digging in the net2 code i managed to write my own UDP based
server, it listes ok. But I cant write the client side.
This is what I do:
socketset = SDLNet_AllocSocketSet(1);
SDLNet_ResolveHost(&serverIP,"192.168.1.1", 1515);
servsocket = SDLNet_UDP_Open(9899);
chan = SDLNet_UDP_Bind(servsocket, -1, &serverIP);
packet=SDLNet_AllocPacket(128);
packet->data[0]=1;
SDLNet_UDP_Send(servsocket,chan,packet);
But no data is received. Can somebody tell what is wrong here?
--
Roger D. Vargas
http://dsgp.blogspot.com | Linux, programación, juegos
______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
Other related posts:
- » [gameprogrammer] again on udp and sdl_net
-- Roger D. Vargas http://dsgp.blogspot.com | Linux, programación, juegos
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html