[gameprogrammer] help with sdl_net and udp

Can somebody give me a quick reference about how to set up a client
server system based on udp using sdl_net? 
Im trying to create a basic server/client demo with sdl_net, but I have
some doubts about the right way to do it.
In server side I do this: Now I create an UDP socket, a socket set and
add that udp socket to socketset. I check socketset, if there are data y
receive it in an udp packet (not a vector of packets like in the demo).
If packet comes from unbound channel,
then it is a new client and I bind it to socket. Else, i must search
what client has that channel. Is that the correct way for the server
side?
In the client side I dont know exactly if I have to bind the socket or
do something else. Right now, I create the socket and add it to a
socketset. 




---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: