Hi,
I was looking for multicast in sdl_net but couldn’t find it.
I wrote some code for it but it would be nice to have it in sdl.
I only tested my code on linux (ubuntu). Edit the code if needed.
It’s probably usefull as base.
The two files i had to edit are found here:
http://fenix.cmi.ua.ac.be/~p051460/sdl/
I also wanted to note that this opaque udpsocket does not allow you to create
this functionality on top of sdl_net. I had to edit the source, uninstall/recompile/install the whole library ending up with some kind of ‘own’ version. So i’m not against opaque objecs and data hiding but you should put the structs in a .h file. If people want to go messy they can do so, if not they probably don’t open the .h at all. If I’m wrong and there is a way to build it on top of sdl please tell me. I’m no c expert.
Pieter-Jan P_________________________________________________________________
Start een boeiend online leven…helemaal gratis dankzij Windows Live!
http://get.live.com
Hi,
SDL_net only exposes a very simple networking API. I don’t believe that
it is (currently) intended to be comprehensive.
A quote from the Overview of the documentation for SDL_net:
“If you are interested in multicast and non-TCP/IPv4 networking then
SDL_net is not the right thing for you.”
I think that’s the most comprehensive answer you’re gonna get.
As for your comments about opaque pointers - this is the wrong approach;
you’re trying to force something designed for one job into doing another.
A far better approach would be (using the current style of SDL_net APIs)
to add new APIs to the current library (call it SDL_net 1.3?) to do the
job you want and pass that back to the list.
Eddy
pieter-jan pintens wrote:> Hi,
I was looking for multicast in sdl_net but couldn’t find it.
I wrote some code for it but it would be nice to have it in sdl.
I only tested my code on linux (ubuntu). Edit the code if needed.
It’s probably usefull as base.
The two files i had to edit are found here:
http://fenix.cmi.ua.ac.be/~p051460/sdl/
I also wanted to note that this opaque udpsocket does not allow you
to create
this functionality on top of sdl_net. I had to edit the source,
uninstall/recompile/install the whole library ending up with some kind
of ‘own’ version. So i’m not against opaque objecs and data hiding
but you should put the structs in a .h file. If people want to go messy
they can do so, if not they probably don’t open the .h at all. If I’m
wrong and there is a way to build it on top of sdl please tell me. I’m
no c expert.
Pieter-Jan P
Neem je Messenger vrienden overal mee met Messenger op je gsm! Messenger
voor Mobile http://www.windowslivemobile.msn.com/?mkt=nl-be
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org