Click here to Skip to main content
15,890,982 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

How can I check, server availability at a particular IP address.When am directly using cURL to pass arguments to server, and do some operation, its taking really long time to through error if server is not available.


Some solution please..


Thanks and regards
Vamshi
Posted
Updated 22-Jul-13 0:34am
v2

1 solution

I would have tried this:

C#
int result = system("ping /*host ip*/");

if(result == 0)
{
    /* host responding */
    /* launch cURL call */
}


You will need stdlib.h for this I believe.

Edit:
Just found out that we already have a cool wrapper component on this forum for ping issues:
CPing v1.22[^]
 
Share this answer
 
v5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900