Hello,
I am writing a program to detect the status of network.
In my program, I need get the status of network when the connection is
set disable. here it is not by connecting the network to get the
status.
which API or method can work for it?
for example, if my lan cable is unpluged or the net
Try the SCNetworkReachability API...
I borrowed the following from one of Apple's examples:
- (BOOL)isDataSourceAvailable
{
static BOOL checkNetwork = YES;
if (checkNetwork) { // Since checking the reachability of a host
can be expensive, cache the result and perform the reachability c
The SCF documentation specifically says SC routines cannot be used to
test *remote* reachability and should only be used to test whether a
packet can *leave* the host. If this is all you need, then Michael's
example will work. If you need to test remote reachability, you will
need to devise som
Thank you the quickly advices of Michael and Mike very much.
I test Michael's sample, it works well. But I think the
SCNetworkReachability API is also used to try to connect to the
server, right?
What I want is to get the status of the network without any connection
to the server. Maybe What I sa
On 12 Jul '08, at 9:46 AM, xiaobin wrote:
I test Michael's sample, it works well. But I think the
SCNetworkReachability API is also used to try to connect to the
server, right?
What I want is to get the status of the network without any connection
to the server.
The SC reachability API does n
On Jul 9, 2008, at 8:22 AM, xiaobin wrote:
Hello,
I am writing a program to detect the status of network.
In my program, I need get the status of network when the connection is
set disable. here it is not by connecting the network to get the
status.
which API or method can work for it?
I'v