Xand3r Posted February 7, 2010 Share Posted February 7, 2010 Is TCPTimeout supposed to apply to TCPConnect too? If so than why does this show 20 seconds for me? TCPStartup() #include <GUIConstants.au3> Opt('TCPTimeout' , 100) GUICreate('') GUISetState() $start = TimerInit() $x=TCPConnect('86.55.211.38' , 65001) MsgBox(0 ,@error ,"Socket: " & $x & @CRLF & "Time: " & Round(TimerDiff($start)/1000,2) & " seconds") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE TCPShutdown() Exit EndSelect WEnd I setup firewall so that it drops any attempt to connect to 65001 so in theory TCPConnect should take about 100 ms to report a failure right? Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
trancexx Posted February 7, 2010 Share Posted February 7, 2010 I think Opt('TCPTimeout' , ...) do nothing. That option is probably abandoned somewhere in the past. Option you want to set is unsettable. And I don't mean AutoIt. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
tirom Posted May 8, 2010 Share Posted May 8, 2010 Opt("TCPTimeout",10) Global $out_txt TCPStartup() $iBeginTime = TimerInit() $socket = TCPConnect("192.168.1.18", 8080) If $socket <> -1 Then $out_txt = "Connect Successful! time-consuming: " & Round(TimerDiff($iBeginTime) / 1000, 4) & "sec" Else $out_txt = "Connect Failed! time-consuming: " & Round(TimerDiff($iBeginTime) / 1000, 4) & "sec" EndIf TCPCloseSocket($socket) ConsoleWrite($out_txt & @CRLF) MsgBox(0, "", $out_txt) The result: Connect Failed! time-consuming: 20.9968sec Expo 2010 Shanghai China中国2010年上海世博会 Link to comment Share on other sites More sharing options...
Tvern Posted May 8, 2010 Share Posted May 8, 2010 Don't expect people to be too helpfull when you revive 4 old threads about a subject that is already filed as a known bug. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now