#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 , 16 years ago
follow-up: 5 comment:2 by , 16 years ago
Ther is a fix in the pipe that is going to do the same timeout as for other TCP...() functions.
Is that OK?
follow-up: 6 comment:5 by , 16 years ago
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
follow-up: 7 comment:6 by , 16 years ago
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.
follow-up: 8 comment:7 by , 16 years ago
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?
comment:8 by , 16 years ago
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

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
Else
EndIf
TCPCloseSocket($socket)
ConsoleWrite($out_txt & @CRLF)
MsgBox(0, "", $out_txt)