Solved

How to find out, if I'm online

Posted on 2002-03-20
8
184 Views
Last Modified: 2010-03-31
Is there a method in the API to find out, if I'm currently connected to the internet ?

thx,

Ben Utzer
0
Comment
Question by:benutzername
8 Comments
 
LVL 9

Expert Comment

by:Venci75
ID: 6882245
What do you mean with "connected to the internet"?
0
 

Expert Comment

by:Pecos
ID: 6883509
Write your own..
You can choose a dependable address out there on the net (say some pop3 server).  Then you can try to open a socket connection to port 23 (or is that for ftp? no matter).  If it opens, then you're good to go.

You can also try to just ping something (yahoo.com).
0
 
LVL 1

Expert Comment

by:saurav17
ID: 6885020

hi benutzername,

As Pecos has said try  pinging websites
no other go.

as pecos said writting socket program to pop3 server u need to know the prtno., 23 is not default port for pop3 servers. It depends on what administrators choose. The best way is pinging or keep refreshing ur webpage or webcomponents like messengers by hiiting F5.


Regards,
K.J.S.
0
 
LVL 2

Expert Comment

by:coreyit
ID: 6888066
saurav17,

Perhaps you should take a look at the tips at the bottom of this page. Especially the "...and doesn't duplicate a previous comment" part.

-corey
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:benutzername
ID: 6889152
>Is there a method in the API to find out, if I'm currently connected to the internet ?

Sorry guys, pinging a website is an obvious soloution and was my first idea, too, so there won't be any points for that idea...

I was looking for something like java.net.isOnline() ... so a profound "no, you gotta do it yourself" would've been worth 50 points to me.

Never mind,

Ben Utzer
0
 

Accepted Solution

by:
Pecos earned 50 total points
ID: 6889606
Oh.. I guess my first line "Write your own.." isn't anything like "no, you gotta do it yourself."
:)
0
 

Author Comment

by:benutzername
ID: 6890207
ok, take them if you want them
0
 

Author Comment

by:benutzername
ID: 6890208
ok, take them if you want them
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now