Server.start_daemon

Server.start_daemon()[source]

Starts the server. The server will run in an endless loop until the message ‘quit’ is received. Clients can connect to the TCP port and send a text string. The message will be parsed by the parser, which will call the respective function. If the message is invalid, a help string is sent to the client.

The binding to the TCP port might fail for several reasons (e.g. the port is already in use by another process or requires admin rights), in which an OSError exception is raised. If the binding is successful, the server should be able to manage all exceptions, log them, and continue normal operations.

Raises

OSError – Various socket errors, e.g. address or timeout