How do you check whether a user is connected to the Internet or 开发者_如何学JAVAnot?
First define internet (e.g. sometimes only certain services are accessable, like when only HTTP traffic through a proxy is allowed).
In general, the only somewhat reliable solution is simply to try and check if the targeted service responds.
What flavor of Pascal are you using? You should have some Internet library available. If you want to know if there's a connection available, the easiest way to do that is to see if you can connect to anything. How exactly you do this depends on your internet library, but if I had to do this I'd simply try to ping google.com and see if it succeeds or not.
精彩评论