Server.__init__¶
-
Server.
__init__
(config_file: str = None, pid_file_name: str = 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
config_file¶ (str, optional) – Configuration file, default is None.
pid_file_name¶ (str, optional) – If given, overrides the default
PID file name
.
- 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