Opened 12 years ago

Closed 10 years ago

#2188 closed Feature Request (Rejected)

UDPRecv delay able to be set with the TCPTimeout AutoIt Option

Reported by: kealper@… Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


As of right now, UDPRecv has a non-changeable 100ms delay if no data was received, but it would be nice if UDPRecv's delay could be tied to the "TCPTimeout" option, much like TCPRecv and TCPAccept are. With the current implementation it makes UDP networking in AutoIt a bit difficult, because of that delay.

Alternatively, a "UDPTimeout" AutoIt option could be helpful as well, that would let people set the delay (or remove it entirely by setting it to 0, like the current "TCPTimeout" option does for TCPAccept and TCPRecv).

This is some simple code to demonstrate the delay I'm referring to:


;Make things like TCPAccept return instantly instead of blocking for the default
;100ms after no activity. Doing this is useful if your program does more than
;just wait for data on a specific socket.
Opt("TCPTimeout", 0)

;Bind a random port, what port doesn't matter, it only needs to be a valid socket
Global $Sock = UDPBind("", Random(1, 65535))

While 1
    $iTimer = TimerInit()
    $sRecv = UDPRecv($Sock, 512) ;Time how many milliseconds it takes to call UDPRecv and write time to stdout
    ConsoleWrite(TimerDiff($iTimer) & @CRLF)

Attachments (0)

Change History (1)

comment:1 Changed 10 years ago by Jon

  • Resolution set to Rejected
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.