Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

How to find out, if I'm online

Is there a method in the API to find out, if I'm currently connected to the internet ?

thx,

Ben Utzer
0
benutzername
Asked:
benutzername
1 Solution
 
Venci75Commented:
What do you mean with "connected to the internet"?
0
 
PecosCommented:
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
 
saurav17Commented:

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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
coreyitCommented:
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
 
benutzernameAuthor Commented:
>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
 
PecosCommented:
Oh.. I guess my first line "Write your own.." isn't anything like "no, you gotta do it yourself."
:)
0
 
benutzernameAuthor Commented:
ok, take them if you want them
0
 
benutzernameAuthor Commented:
ok, take them if you want them
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now