Re: UDP Broadcasts Don't Work
Re: UDP Broadcasts Don't Work
- Subject: Re: UDP Broadcasts Don't Work
- From: Quinn <email@hidden>
- Date: Wed, 22 Aug 2007 10:02:41 +0100
At 0:39 -0400 22/8/07, Brian Barnes wrote:
BINGO! That was it, I had no idea I had to bind to INADDR_ANY, and
was instead binding to the discovered IP of the machine. This fixes
everything, thank you very much. I knew it was some bit of minutia
that I obviously didn't know, you've been a great help and now dim3
can auto-discover local servers!
A couple of points:
o If you're doing service discovery, you should be using Bonjour.
Why? Two key reasons:
- It's easier get the job done because Bonjour does all the heavy
lifting. No faffing around with sockets!
- Bonjour has /lots/ of smarts to minimise the amount of traffic on
the network. Sysadmins the world over will love you.
<http://developer.apple.com/networking/bonjour/index.html>
o I haven't updated it in a while, but the information in DTS
Technote 1145 "Living in a Dynamic TCP/IP Environment" is still good.
Specifically, it addresses lots of the issues associated with the
more-difficult-than-it-seems question of "What's my IP address?"
<http://developer.apple.com/technotes/tn/tn1145.html>
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden