Hello Bruce and all others,
coming from Nettalk 9 to Nettalk 11, I have one problem to solve now.
In the past I used to have two objects, one for the insecure, the other for the secure port.
https://capesoft.com/docs/NetTalk11/NetTalk10Upgrade.htm#ListeningOn2PortsI still have the need to serve both server under one address.
As far as I understand now, I need to have two different server-EXE simultaniously, one listening on the insecure port, the other on the secure port with the self-issued certificate.
The insecure servre will serve some static pages, but probably also the API-dokumentation.
I want to avoid the warnings when I call those static URLs on the secure port, so I am willing for those manouvers.
For installing / starting / stopping / removing the recent server (NT9) I have an Admin.EXE. Since there will be two EXE now, I look to keep the UX still the same. So only one set of buttons to administer the background service. Having two servers individually to start will lead to a mess.
My idea: Once one server is started (reading the port number from an INI like before), it will then check, whether the other server (same EXE, but different port) runs. If NOT running, then it will start the same EXE with RUN(), passing the other purpose as a parameter. Because the calling program is a background service, the called server with the other port runs with the same credentials, IOW it will be invisible like the service. Which is a desired behaviour.
Now on the buttons to stop / remove the background service, I prepend that service-calls with a NetWebClient method to shutdown the other server. Just issueing a POST(CloseDown) in the service method.
When in the Admin.EXE the service is now restarted, it will perform a check and RUN() for the other server. Probably repeatedly in the TIMER.event. like a kind of watchdog. So the can keep each other running.
To me it sounds reasonable.
Any other opinion?
Thank you in advance!
bye
Wolfgang