So, about my task is this:
The HTTP server creates a connection to some address, such as localhost:4567
, at which the directory selected by the user is available.
For example: In the test/
directory are the files index.html
, contact.html
, menu.html
. I create a connection and at localhost:4567/index.html
, I have a page from the test/
directory, if I go to localhost:4567/menu.html
, the menu.html
from the test/
directory opens, and so on. At the same time, I want to periodically refresh the page from my main Qt application (that is, not to press F5 in the browser, but for my program / server to refresh the page itself).
In short , the server needs only 2 functions: to make the contents of a directory accessible to the browser at localhost:4567
and to be able to update the page from my Qt program.
Need to write your own HTTP server or are there ready solutions? In which direction to dig, please tell me.