check port in use
Unsolved
General and Desktop
-
Hi,
AFAIK, one simple way is to try to connect to that port but you can have a race condition as between the moment you check and the moment you continue your logic, another process may have requested said port.
What is your use case ?
-
@wrosecrans thx, is there example or syntax on listen the port? using http qtwebapp, I have a browser that use local port for the server, and want to make sure there is no conflict with local host port.
-
-
@s002wjh said in check port in use:
is there example or syntax on listen the port
-
@s002wjh said in check port in use:
can I do this without creating new tcpserver etc?
No, because listen() is not static