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

Module FoamServer

source code

A XMLRPC-Server that answeres about the current state of a Foam-Run

Classes [hide private]
  FoamAnswerer
The class that handles the actual requests (only needed to hide the Thread-methods from the world
  FoamServer
This is the class that serves the requests about the FOAM-Run

Functions [hide private]
  findFreePort()
Finds a free server port on this machine and returns it

Imports: ServerBase.ServerBase, xmlrpclib.ServerProxy, configuration, as, config, versionString, Basics.RingBuffer.RingBuffer, NetworkHelpers.freeServerPort, Logging.foamLogger, FoamInformation.foamMPI, RunDictionary.ParameterFile.ParameterFile, Hardcoded.userName, threading.Lock, threading.Thread, threading.Timer, time.time, os.environ, os.uname, os.path, os.getpid, socket, sys, string, traceback.extract_tb


Function Details [hide private]

findFreePort()

source code 

Finds a free server port on this machine and returns it

Valid server ports are in the range 18000 upward (the function tries to find the lowest possible port number

ATTENTION: this part may introduce race conditions