How to check server connection on client side
-
Hi,
How to check connection with remote server from the client side? Maybe something like ping, or from Qt networking? linux -
@YtreioJ simply telnet to the host at the service port, if service is listening you'll have at least a connection... to check a Squid server is listening on port 3128 do:
telnet hostname/ip_address 3128
-
@Pablo-J.-Rogina How to use it? From which library? Examples?
-
@YtreioJ One way to do it is to create your script and then execute it from your app using QProcess
can help : https://github.com/edhana/qt-ping-example
-
@YtreioJ said in How to check server connection on client side:
but how to make him return true/false
do you mean :
how to return true or false in your script ?
or
how your app will see the result of executed process ?Could you please detail a bit more your questions every time ?
-
@LeLev yes, i've tried to create external script with ping command, but how to make him return true/false
Have you looked at the docs for whatever external
ping
command you are using to see if perhaps its exit code tells you anything about success?
9/11