Scanning for local servers, getting a broadcast address

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Mon Jun 9 21:09:48 EDT 2003


Noah wrote:
> Ah, yes, of course. But I did not know that you could use
> '<broadcast>' for the bind side. Does that tell it to
> listen on all available interfaces?

Well, in my opinion, it should. The problem is that certain
OS-ses (windows, mac os X) with certain Python implementations
decide otherwise, and return an error ("cannot assign requested
address" or such). In that case, '' usually *does* work.
Binding on the ip address always works, but you'll only get
broadcast packets that are sent to *that* adapter.

--Irmen





More information about the Python-list mailing list