Modify

#1310 closed Feature Request (Fixed)

TCPConnect Timeout

Reported by: Proggy Owned by:
Milestone: Future Release Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

I'd like the TCPconnect() function to have a parameter where you can specify the timeout before stopping the connection attempt.

The current TCPConnect function is as follows:

TCPConnect(IPAddr,port)

If IPAddr or port is unavailable/closed then the connection attempt only times out after 5-10 secs. What I want is the ability to set the timeout (in ms)

ex:

TCPConnect(IPAddr,port[,timeout])

Thanks
Hawk

Attachments (0)

Change History (8)

comment:1 by anonymous, on May 8, 2010 at 6:54:37 PM

i also have same problem

The result: Connect Failed! time-consuming: 20.9968sec

====
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)

comment:2 by Jpm, on May 13, 2010 at 7:38:04 AM

Ther is a fix in the pipe that is going to do the same timeout as for other TCP...() functions.
Is that OK?

comment:3 by Jpm, on May 17, 2010 at 6:05:56 PM

Resolution: Fixed
Status: newclosed

Fixed with ticket #1573

comment:4 by TicketCleanup, on May 17, 2010 at 8:00:02 PM

Milestone: Future Release

Automatic ticket cleanup.

in reply to:  2 ; comment:5 by bjoern@…, on Jul 23, 2010 at 10:07:17 AM

Replying to Jpm:

Ther is a fix in the pipe that is going to do the same timeout as for other TCP...() functions.
Is that OK?

I don´t understand what you meaning with this sentence. I have the problem too and i don´t know the resolution...

mfg bjoerni

in reply to:  5 ; comment:6 by Jpm, on Jul 25, 2010 at 12:55:10 PM

Replying to bjoern@…:

Replying to Jpm:

Ther is a fix in the pipe that is going to do the same timeout as for other TCP...() functions.
Is that OK?

I don´t understand what you meaning with this sentence. I have the problem too and i don´t know the resolution...

mfg bjoerni

I mean that today we have already a timeout defined by Opt("TCPTimeOUT", ...) which is working with other TCP...() functions.
What I did is to use the same timeout for TCPConnect() too.

in reply to:  6 ; comment:7 by anonymous, on Jul 25, 2010 at 1:39:05 PM

Replying to Jpm:

Replying to bjoern@…:

Replying to Jpm:

Ther is a fix in the pipe that is going to do the same timeout as for other TCP...() functions.
Is that OK?

I don´t understand what you meaning with this sentence. I have the problem too and i don´t know the resolution...

mfg bjoerni

I mean that today we have already a timeout defined by Opt("TCPTimeOUT", ...) which is working with other TCP...() functions.
What I did is to use the same timeout for TCPConnect() too.

so you plan to implement this in the future? or is it already included in the beta?

in reply to:  7 comment:8 by Jpm, on Jul 25, 2010 at 5:47:08 PM

Replying to anonymous:

Replying to Jpm:

Replying to bjoern@…:

Replying to Jpm:

Ther is a fix in the pipe that is going to do the same timeout as for other TCP...() functions.
Is that OK?

I don´t understand what you meaning with this sentence. I have the problem too and i don´t know the resolution...

mfg bjoerni

I mean that today we have already a timeout defined by Opt("TCPTimeOUT", ...) which is working with other TCP...() functions.
What I did is to use the same timeout for TCPConnect() too.

so you plan to implement this in the future? or is it already included in the beta?

Yes, it is in the next beta or Release

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.