Jump to content

TCPConnect Timout


autoitxp
 Share

Recommended Posts

  • 2 years later...

Opt("TCPTimeout",1)

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

Edited by tirom

Expo 2010 Shanghai China中国2010年上海世博会

Link to comment
Share on other sites

  • Developers

You posted your question now 5 times in 5 different threads.

Next time you will get some forced time off as this behaviour is not acceptable here.

mm Even posted your so called problem in a feature request in TRAC.. Is anything on fire or something?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...