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.
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
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.
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: