gregoryxie / nicer-rack

MIT License
0 stars 0 forks source link

Implement Webserver to TCP server socket, add path checking #9

Closed tristan1049 closed 2 years ago

tristan1049 commented 2 years ago

Add a continually living socket to TCP server that listens on Web Port. The socket on the Web Port is then connected to through API requests to the flask app from the webserver, sending information along with it.

Current communication protocol between the flask app and TCP server along the socket consists of first sending a 1-byte message indicating the length in bytes of the actual message following it, allowing the TCP server to read the exact amount in bytes to extract the message sent.

Also fixed a few small bugs, and adding working directory path checking, as different scripts would create files in different directories due to different working directories for each script.