Skip to content

Integration of socket connection between web page and python external program using named pipes

Luca Bonetti requested to merge iss03_integration_socket_html into master

Related to the issue #3 (closed), this MR is created in order to integrate a socket connection between web page and python external program.

After clicking on the button Connect to socket, a socket is created and a json object with a integer value data is sent to the python external program that is waiting for this.

When it receives the data request, it creates so a named pipe in writing mode and it writes every 0.25 seconds a response with a random value (from 1 to 100) in order to be read by the PHP page with the named pipe in reading mode and so shown in a gauge google chart into the web page in real time. And every second it also inserts a data in the database that is shown in the web page (in table google chart) in real time.

@cavada as observer

Merge request reports