benutzername
asked on
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
thx,
Ben Utzer
What do you mean with "connected to the internet"?
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).
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).
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.
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
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
ASKER
>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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, take them if you want them
ASKER
ok, take them if you want them