Solved

How to find out, if I'm online

Posted on 2002-03-20
8
193 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mysql jsp example issue 32 96
CSV file parsing thru Java 13 54
restrict decimal places for double datatype 10 50
Find out all repos that a user is most active on Github 1 58
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

751 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