SDL_net: How do I allow 2 applications listening to the same UDP (broadcast) message?

I’m using SDL_net and sending UDP broadcast messages. I’ve got 2 applications listen to the same message. They are fine when they are running on 2 PC’s. If I put them on the same PC the secondly started application (listener) always fails because the port is already in use.

My question:
How can I allow multi-processes listen to the same port on one PC?
I found similar topic:
http://bytes.com/groups/net-c/233554-udp-listen-same-port-two-apps-same-time
but I don’t know how to apply that to SDL_net.

Can anyone help?

Thanks
Phuoc

/_/_/_/_/_/_
www.huaonline.com
My Homepage is my Castle

  Need a Holiday? Win a $10,000 Holiday of your choice. Enter now.http://us.lrd.yahoo.com/_ylc=X3oDMTJxN2x2ZmNpBF9zAzIwMjM2MTY2MTMEdG1fZG1lY2gDVGV4dCBMaW5rBHRtX2xuawNVMTEwMzk3NwR0bV9uZXQDWWFob28hBHRtX3BvcwN0YWdsaW5lBHRtX3BwdHkDYXVueg--/SIG=14600t3ni/**http%3A//au.rd.yahoo.com/mail/tagline/creativeholidays/*http%3A//au.docs.yahoo.com/homepageset/%3Fp1=other%26p2=au%26p3=mailtagline

Hey,

you could have a daemon listen for messages, and pass it along to the other processes (the actual applications).

Good luck,
Pat> ----- Original Message -----

From: Phuoc Can Hua
To: sdl at lists.libsdl.org
Sent: Saturday, May 30, 2009 7:49:38 AM
Subject: [SDL] SDL_net: How do I allow 2 applications listening to the same UDP (broadcast) message?

I’m using SDL_net and sending UDP broadcast messages. I’ve got 2 applications
listen to the same message. They are fine when they are running on 2 PC’s. If I
put them on the same PC the secondly started application (listener) always fails
because the port is already in use.

My question:
How can I allow multi-processes listen to the same port on one PC?
I found similar topic:
UDP Listen on same port by two apps at same time - C# / C Sharp
but I don’t know how to apply that to SDL_net.

Can anyone help?

Thanks
Phuoc

/_/_/_/_/_/_
www.huaonline.com
My Homepage is my Castle

  Need a Holiday? Win a $10,000 Holiday of your choice. Enter 

now.http://us.lrd.yahoo.com/_ylc=X3oDMTJxN2x2ZmNpBF9zAzIwMjM2MTY2MTMEdG1fZG1lY2gDVGV4dCBMaW5rBHRtX2xuawNVMTEwMzk3NwR0bV9uZXQDWWFob28hBHRtX3BvcwN0YWdsaW5lBHRtX3BwdHkDYXVueg--/SIG=14600t3ni/**http%3A//au.rd.yahoo.com/mail/tagline/creativeholidays/*http%3A//au.docs.yahoo.com/homepageset/%3Fp1=other%26p2=au%26p3=mailtagline


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

My question:
How can I allow multi-processes listen to the same port on one PC?
I found similar topic:
UDP Listen on same port by two apps at same time - C# / C Sharp
but I don’t know how to apply that to SDL_net.

It looked for a moment that by calling SDLNet_UDP_Open with 0 as the
port, it would skip binding the port, which you could then do
yourself, after having set the SO_REUSEADDR socket option, but it
turns out that you do not seem to have access to the _UDPsocket
structure outside of SDLnetUDP.c, which would be needed to do this.On Sat, May 30, 2009 at 8:49 AM, Phuoc Can Hua wrote: