HI All,
Is there anybody have an idea of how to detect internet is reachable ?
At present , I'm using ping to detect internet is reachable , but it's
maybe a bad idea , some firewall of router may block ping requesting.
Best Regards,
Ke Tao 5 2705
Ke Tao <ko*****@gmail. comwrites:
Is there anybody have an idea of how to detect internet is reachable ?
At present , I'm using ping to detect internet is reachable , but it's
maybe a bad idea , some firewall of router may block ping requesting.
Standard C has no network support. You'll need to ask in a form that
deals with your system. See question 19.40 in the comp.lang.c FAQ,
<http://www.c-faq.com/>.
--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Keith Thompson <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
Ke Tao <ko*****@gmail. comwrites:
Is there anybody have an idea of how to detect internet is reachable ?
At present , I'm using ping to detect internet is reachable , but it's
maybe a bad idea , some firewall of router may block ping requesting.
Standard C has no network support. You'll need to ask in a form that
deals with your system. See question 19.40 in the comp.lang.c FAQ,
<http://www.c-faq.com/>.
Actually, it's worse than that, he probably should first try in some
group that deals with Internet programming in general, and then he'll
realize that using ping (or some equivalent activity, such as just
trying to download a generally-available big commercial home page
like http://www.yahoo.com, or better, pinging a list of DNS servers)
is generally about as good as you're gonna be able to do.
Usually, the only way to know if you're connected to the Internet
is just to try to download something from the Internet, and a lot of
purported API functions that promise to tell you your connection
status at the SYSTEM level either don't work very well or at all, and/or,
you guessed it, just try to connect to something on the Internet...
However, you should definitely check them out if available, they
MAY work for your purposes...it depends a lot on exactly what
type of connection they are expecting, and in any case you are
much more likely to be successful if you know PRECISELY the
connection software/hardware that you are looking for ("default"
connection software, dial-up vs. LAN, etc.)...
---
William Ernest Reid
At about the time of 7/17/2007 10:19 PM, Bill Reid stated the following:
Keith Thompson <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
>Ke Tao <ko*****@gmail. comwrites:
>>Is there anybody have an idea of how to detect internet is reachable ? At present , I'm using ping to detect internet is reachable , but it's maybe a bad idea , some firewall of router may block ping requesting.
Standard C has no network support. You'll need to ask in a form that deals with your system. See question 19.40 in the comp.lang.c FAQ, <http://www.c-faq.com/>.
Actually, it's worse than that, he probably should first try in some
group that deals with Internet programming in general, and then he'll
realize that using ping (or some equivalent activity, such as just
trying to download a generally-available big commercial home page
like http://www.yahoo.com, or better, pinging a list of DNS servers)
is generally about as good as you're gonna be able to do.
Usually, the only way to know if you're connected to the Internet
is just to try to download something from the Internet, and a lot of
purported API functions that promise to tell you your connection
status at the SYSTEM level either don't work very well or at all, and/or,
you guessed it, just try to connect to something on the Internet...
However, you should definitely check them out if available, they
MAY work for your purposes...it depends a lot on exactly what
type of connection they are expecting, and in any case you are
much more likely to be successful if you know PRECISELY the
connection software/hardware that you are looking for ("default"
connection software, dial-up vs. LAN, etc.)...
---
William Ernest Reid
Even though this is off topic, I usually do a dns lookup on something
like www.yahoo.com.
--
Daniel Rudy
Email address has been base64 encoded to reduce spam
Decode email address using b64decode or uudecode -m
Ke Tao <ko*****@gmail. comwrote:
# HI All,
#
# Is there anybody have an idea of how to detect internet is reachable ?
# At present , I'm using ping to detect internet is reachable , but it's
# maybe a bad idea , some firewall of router may block ping requesting.
The internet is an amorphous collection of beellions
and beellions diverse and oft noncooperative computers.
The internet is also at times partionned with no notification.
It makes no real sense to talk about the 'internet' is reachable.
Instead concern yourself with whether your immediate network
is reachable, which can be determined by a telephone or ethernet
carrier detect, and then whether you can reach specific hosts out
there in the great beyond.
--
SM Ryan http://www.rawbw.com/~wyrmwif/
Raining down sulphur is like an endurance trial, man. Genocide is the
most exhausting activity one can engage in. Next to soccer.
Daniel Rudy wrote:
>
At about the time of 7/17/2007 10:19 PM, Bill Reid stated the following:
Keith Thompson <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
Ke Tao <ko*****@gmail. comwrites:
>Is there anybody have an idea of how to detect internet is reachable ? At present , I'm using ping to detect internet is reachable , but it's maybe a bad idea , some firewall of router may block ping requesting.
[...]
Even though this is off topic, I usually do a dns lookup on something
like www.yahoo.com.
<OT mode="even further" note="so why am I posting this?">
And when the local router caches DNS and returns an IP, even though
the other side is disconnected? Or when you can get to "the internet",
but there is a problem between you and Yahoo's DNS server?
One needs to define what "internet is reachable" means. And then one
needs to ask somewhere this is topical.
</OT>
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer .h|
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:Th***** ********@gmail. com> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David McCulloch |
last post by:
QUESTION-1:
How can I detect if Norton Internet Security is blocking pop-ups?
QUESTION-2a:
How could I know if a particular JavaScript function has been declared?
QUESTION-2b:
How could I know if Window.Open has been redefined?
BACKGROUND:
|
by: Yurij Nykon |
last post by:
Hi all.
How can I detect the version of Flash-Plugin installed in Internet
Explorer?
In Netscape i can do this with following java script
navigator.plugins.description
But it doesn't works in IE?
Can anyone help me?
Thanx in advance,
|
by: hb |
last post by:
Hi,
Would you please tell me how to detect if the client's browser is closed?
I need such event to trigger a database modification.
Thank you
hb
|
by: sanjeeev |
last post by:
I am loooking for the bet way to share files between Internet and
Intranet application in real time, means as soon as an file is
uploaded to the intranet application it should show up in the internet
application.
Thanks,
|
by: Dan Sikorsky |
last post by:
I can send email using C# and SMTP, but keep closing the connection before
the .eml file has left the Queue folder. The length of time the .eml file
stays in the Queue folder is dependent on the size of that file; big or many
attachments increases the time.
If I start an internet connection, issue the smtp mail send and then close
the connection in my C# program, I need to wait until the .eml file has left
the Queue folder. Otherwise,...
| |
by: Adam Honek |
last post by:
Hi all,
How would one test for internet connectivity in VB.NET instead
of using the Win32 API methods?
Thanks,
Adam
|
by: Arthur |
last post by:
Hi,
I am trying to write a windows service in VC++.NET 2003, the task of
this server is to detect the kind of internet connection and if there
is a connection send some file and do something.
I have found a method calls InternetGetConnectedState() in .net, this
returns false or true for connection also this one has flags and you
can use them to know what kind of connection machine uses.
But here is my problem: suppose you don't have...
|
by: perspolis |
last post by:
Hi all
How can I find that user is connected to internet or not?
thanks in advance
|
by: adalton |
last post by:
I've been trying to figure out how to test for a valid internet connection.
I am able to connect to a valid internet connection, but when it drops, or
if it is not there when my program starts, I get an exception.
This probably is a newbie question, but I do not even know what or how I
would trap that error.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |