ariane.lib.communication

class ariane.lib.communication.Server(service_id: str, port: int, *, config: Any)[source]

Base class for server communication.

abstract process(action: str, data: dict)[source]

Template method for processing incoming messages.

run_service()[source]

Runs the service in an infinite loop while receiving and sending messages according to our predefined format. Message format: [service id, empty, action, data]

class ariane.lib.communication.Client(service_id: str, port: int, ip_server: str)[source]

Base class for client communication.

It contains methods for communicating (sending, receiving) with a server according to the predefined message format.

For the format, please see the server’s documentation.