detecting socket in use on localhost

Berends j at jochem.{N0SP4M}.tv
Mon Oct 4 09:08:01 CEST 2004

I am looking for some code to detect whether or not there is already a 
listener to a socket (tcp or udp) on the localhost.

I am writing some software that can be run multiple times on a localhost 
and each will instantiate a listener in a range of ports. I have checked 
several resources (Cookbook, Python Network Programming (Goerzen), 
Programming Python(Lutz)) but cannot find the crux.

Anyone care to point me to some nice methods?

ciao Jochem

More information about the Python-list mailing list