|
-
Jul 20th, 2003, 08:04 PM
#1
Thread Starter
Lively Member
Timeout and winsock
I'm just starting to use winsock and couldn't for the life of me come up with an effective way to detect timeout on connection.
Can anyone help me?
-
Jul 22nd, 2003, 11:10 AM
#2
Addicted Member
you pretty much have to implement one for yourself with an extra timer control,
then somewhere in your code you go into a feedback loop waiting for xxx=true like
VB Code:
'connect and stuff
timer1.enabled =true
while not downloadcomplete
sleep 60
doevents
if timer1.enabled = false then
msgbox "timed out"
end if
wend
sub timer1_timer()
timer1.enabled =false
end sub
Free Code, papers, tools, and more
http://sandsprite.com
-
Jul 22nd, 2003, 11:11 AM
#3
Addicted Member
oops forgot after msgbox exit loop
Free Code, papers, tools, and more
http://sandsprite.com
-
Jul 23rd, 2003, 03:41 AM
#4
Thread Starter
Lively Member
Thanks for the help. I came up with a similar idea and it works pretty well.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|