seb24
asked on
How to know if I 'm connected ?
I want to write an application like the microsoft tray icon...
I think seb24 want to find whether the computer is connected via RAS, and then make a tray icon(if is connected).
So you can download the rascomp from http://www.magsys.co.uk/delphi/, in the example programm you can find all.
For making tray icons, there are so many components at DSP/Torry's/...
Regrads,
Wang
So you can download the rascomp from http://www.magsys.co.uk/delphi/, in the example programm you can find all.
For making tray icons, there are so many components at DSP/Torry's/...
Regrads,
Wang
ASKER
I shearch an api to know if I' m connected to internet...
The dwwang's answer seems good .
The dwwang's answer seems good .
ok, Wang, let's see what you've got
Regards,
Williams
Regards,
Williams
If you mean if there's an internet connection available, you can't really know.
You can detect if there's a ras connection available, as well as an IP, but you can't know if you're connected to the Internet.
It's easier modem wise, but what happens if you're part of an Intranet?....you won't be able to know if you're connected unless you ping some out side server. On the other hand, what would happen if you're behind a firewall?...
You can detect if there's a ras connection available, as well as an IP, but you can't know if you're connected to the Internet.
It's easier modem wise, but what happens if you're part of an Intranet?....you won't be able to know if you're connected unless you ping some out side server. On the other hand, what would happen if you're behind a firewall?...
You can do it by pinging a server, and there's no problems regarding to firewalls. The only problem is, that a connector from the outside will not be able to page you, but that is not the point. I can handle this without any problems at all.
If I was to do it, I would first test if there was a connection to an outside server. If that was not the case, I would go to some sort of sleep mode, where I would test the server if
1) I detected a RAS connection
2) Some time has passed by let's say 30 seconds.
Regards,
Williams
If I was to do it, I would first test if there was a connection to an outside server. If that was not the case, I would go to some sort of sleep mode, where I would test the server if
1) I detected a RAS connection
2) Some time has passed by let's say 30 seconds.
Regards,
Williams
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Regards,
Williams