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

Module NetworkHelpers

source code

Helpers for the networking functionality

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

freeServerPort(start, length=1)

source code 

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

checkFoamServers(host, start, length=1)

source code 

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