Hi,
I am using a web server in my app and trying to work out if there is a way to detect if the port is already being used.
Is there a way to detect if the port is already in use before the server starts ?
I am using a web server in my app and trying to work out if there is a way to detect if the port is already being used.
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Private server As HttpServer
End Sub
Sub StartServer
Dim port As Int = 5555
server.Initialize("Server")
server.Start(port)
End Sub
Is there a way to detect if the port is already in use before the server starts ?