B4J Question Webserver status

mrred128

Active Member
Licensed User
Longtime User
I would like to know if there is any way to get the status of the server object. I just need to know if it is running or not, for application control.
 

mrred128

Active Member
Licensed User
Longtime User
The above mentioned functionality. From the application (server) I would like to be able to "see" if the web server is running and have the ability to change the port ( I would assume I would have to stop/start the jetty bits). If I have to drop the host application, there would be no point.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You didn't mention changing ports which is a more complicated issue.

Once you call Server.Start the server will keep running until the process is killed. You can use a global variable to monitor its running state.

It is not possible to change the port when the server is running. You can create another app that is responsible for killing the server process and starting it with the port passed as a command line parameter.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…