Package PyFoam :: Package Basics :: Module NetworkHelpers
[hide private]
[frames] | no frames]

Module NetworkHelpers



Helpers for the networking functionality

Functions [hide private]
  checkFoamServers(host, start, length=1)
Finds the port on a remote host on which Foam-Servers are running
  freeServerPort(start, length=1)
Finds a port that is free for serving

Imports: configuration, errno, socket, time, _xmlplus, xmlrpclib


Function Details [hide private]

checkFoamServers(host, start, length=1)

 
Finds the port on a remote host on which Foam-Servers are running
Parameters:
  • host - the IP of the host that should be checked
  • start - the port to start with
  • length - the number of ports to scan
Returns:
a list with the found ports, None if the machine is unreachable

freeServerPort(start, length=1)

 
Finds a port that is free for serving
Parameters:
  • start - the port to start with
  • length - the number of ports to scan
Returns:
number of the first free port, -1 if none is found