[gameprogrammer] Re: help with sdl_net and udp
- From: Bob Pendleton <bob@xxxxxxxxxxxxx>
- To: Gameprogrammer Mailing List <gameprogrammer@xxxxxxxxxxxxx>
- Date: Wed, 06 Apr 2005 14:48:38 -0500
On Wed, 2005-04-06 at 08:13 -0400, Roger D Vargas wrote:
> 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.
Code to do all that with SDL_Net is in my net2 library. You can find it
at http://gameprogrammer.com/net2/net2-0.html you can either use my
library, or just look at the code that creates a udp connection.
Bob Pendleton
>
>
>
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>
>
--
+--------------------------------------+
+ Bob Pendleton: writer and programmer +
+ email: Bob@xxxxxxxxxxxxx +
+ web: www.GameProgrammer.com +
+ www.Wise2Food.com +
+ nutrient info on 6,000+ common foods +
+--------------------------------------+
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] help with sdl_net and udp
- From: Roger D Vargas
Other related posts:
- » [gameprogrammer] help with sdl_net and udp
- » [gameprogrammer] Re: help with sdl_net and udp
- [gameprogrammer] help with sdl_net and udp
- From: Roger D Vargas