I added a daemon storage.
The idea is to create a server that accepts multiple socket connections.
The problem I had with the socket storage was that I needed to launch the formula before the sensor, and there was synchronization issues.
In the code I propose, a thread is running to accept socket connection, and the main thread send the reports to the opened connection. That way, a client can connect and disconnect at any time, while the sensor runs as a daemon.
The storage is launched with the name "daemon", and the P_flag :
Hi,
I added a daemon storage. The idea is to create a server that accepts multiple socket connections. The problem I had with the socket storage was that I needed to launch the formula before the sensor, and there was synchronization issues.
In the code I propose, a thread is running to accept socket connection, and the main thread send the reports to the opened connection. That way, a client can connect and disconnect at any time, while the sensor runs as a daemon.
The storage is launched with the name "daemon", and the P_flag :
After, you just have to connect with a tcp client :
Dependency :
There is room for improvments: