• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • 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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

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