09-01-2023, 05:27 PM
Hi,
Scenario:
In a project I am working on, we use hardware devices running a webbrowser as a display but no touchscreen, mouse or keyboard attached.
They are configured to load a webpage https://webserver.local/externaldisplay
The page https://webserver.local/externaldisplay is handled by a TContentForm in a IntraWeb application.
That page contains a TIWMonitor to poll the server and act based on the response.
When there is a network error or the server is stopped, the client should display a message informing the user of the device.
When the server is restarted the communication has to be restored. No user intervention should be necessary.
Part of this is working.
* After starting up the device, a session is created and the page is loaded via the content handler
* The page is refreshed based on the TIWMonitor response
* When I close the server, a message is displayed in the browser
TIWMonitor.jsCallbackName gets called with value as a parameter. value == -1 when the server is gone.
But when I restart the server, the value keeps being -1. Reason is the old session does not exists anymore.
What should I do to create a new session on a $/QueryStatus call?
Or in what other way can I get the client to keep working after a server restart?
Scenario:
In a project I am working on, we use hardware devices running a webbrowser as a display but no touchscreen, mouse or keyboard attached.
They are configured to load a webpage https://webserver.local/externaldisplay
The page https://webserver.local/externaldisplay is handled by a TContentForm in a IntraWeb application.
That page contains a TIWMonitor to poll the server and act based on the response.
When there is a network error or the server is stopped, the client should display a message informing the user of the device.
When the server is restarted the communication has to be restored. No user intervention should be necessary.
Part of this is working.
* After starting up the device, a session is created and the page is loaded via the content handler
* The page is refreshed based on the TIWMonitor response
* When I close the server, a message is displayed in the browser
TIWMonitor.jsCallbackName gets called with value as a parameter. value == -1 when the server is gone.
But when I restart the server, the value keeps being -1. Reason is the old session does not exists anymore.
What should I do to create a new session on a $/QueryStatus call?
Or in what other way can I get the client to keep working after a server restart?