I’m hoping to use the xojo web application infrastructure for something other then hosting a typical website. I would like to create a virtual session. First thought was to use xojo’s built in htmlviewer inside a desktop application, but unfortunately Xojo does not support libwebkit out of the box. see
Could I hold a Xojo websession with a httpsocket inside a console application? I am aiming for lightweight. Alternatively, I could use a headless web-browser like PhantomJS, but it’s a bit heavy for simply holding a session open.
If I am not mistaken, there is a simpler way to keep a session alive : keep a reference to Session in your code. I would gather that a reference in App or in a module will keep it alive.
Greg will probably tell more about that.
You do need to release the session eventually with a timer or some command.
Hi Michel, Thanks for your response.
Ideally the console application would be located on a remote machine. I would like if possible to communicate to the server via the console application on the remote machine.
Just give it a try. If I am not mistaken, as long as your console app does not reload it will keep its session.
However, from the little you describe, with an apparently not graphical UI console app, I wonder if it would not be much better to communicate with the web app through HandleSpecialURL or HandleURL.
A pure text web service seems more appropriate than a full blow graphical interface.
[quote=301737:@Daniel Wilson]Hi Michel, Thanks for your response.
Ideally the console application would be located on a remote machine. I would like if possible to communicate to the server via the console application on the remote machine.[/quote]
That said, you can add
app.autoquit = false
To the open event and use the console app to call into HandleSpecialUrl or HandleURL.
Thanks Greg, Thanks Michel, your help is always appreciated. looks like I’ll use a headless web-browser.