Net Connection

Just starting out? Need help? Post your questions and find answers here.
Britney
New User
New User
Posts: 8
Joined: Tue Oct 21, 2003 2:06 pm

Net Connection

Post by Britney »

Is there a way to check that the current network connection is live? I mean, if you try to send while it isn't it will result in massive problems, right? The ClientID is set during a successful connection, but does it reset itself to 0 if the connection dies? Or does that variable remain the same?

So, would this be safe?

a=clientid.....etc

if a<>0
perform some network receive/send
endif

Edit: I think I may change my avatar and login details sometime. You can't possibly take me serious like this. Noted. hehe
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post by Codemonger »

PLs change them now :lol:
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Awww... Britney pls don't leave us!!! :cry: i think i'm in love! :twisted:
--Kale

Image
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

When you say "connection" are you referring to a dial-up or to an actual server?
Britney
New User
New User
Posts: 8
Joined: Tue Oct 21, 2003 2:06 pm

Post by Britney »

Actually if anyone can answer both, I'd appreciate it. I did mean connection to a server. If the connection no longer exists, how can I check on that before attempting to send/recieve? My original
connection-id will still be filled with the value of 190 (or whatever)?

The other - checking that the user has a current live net connection is done by InternetGetConnectedState(), somehow, but I am pretty new to using API, so I'm kind lost on that one also.

Edit: Hrm, seems changing my username in profile didn't make a difference.
Codemonger
Enthusiast
Enthusiast
Posts: 384
Joined: Sat May 24, 2003 8:02 pm
Location: Canada
Contact:

Post by Codemonger »

You might have to clear your IE cache or refresh the screen to update your profile as it is probably reading from your old cookie. Also Logout and Login. Picture is gon though :P
<br>"I deliver Justice, not Mercy"

    - Codemonger, 2004 A.D.
Post Reply