Server.__init__¶
- Server.__init__(config_file: Optional[str] = None, pid_file_name: Optional[str] = None, host: Optional[str] = None, port: Optional[int] = None)[source]¶
Initializes and runs the
Server
object. The constructor calls theconfig()
method to read out the server attributes, and initializes thelogger
and the messageparser
. Finally, the methoddaemonize()
tries to lock the PID filepid_file_name
.- Parameters
- Raises
configparser.Error – Configuration file error
LockError – The PID file could not be locked (see here).
OSError – Various socket errors, e.g. address or timeout