Modify

Opened 13 years ago

Closed 13 years ago

#1863 closed Bug (Rejected)

UDPRecv halts script for 100ms when there is no data to recieve

Reported by: qsek@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: UDP timeout recv Cc:

Description

If this is intended/recommended, can there be inserted an option for lowering or removing this 'timeout'?

Purpose: I want to script a game based on UPD fast packet sending and recieving at the same time while painting 2D Graphics and doing various stuff.
To have 100 ms delay on each UDPRecv is quite noticable for this kind of usage.

Example:

;;This is the UDP Server
;;Start this first

; Start The UDP Services
;==============================================
UDPStartup()

; Register the cleanup function.
OnAutoItExitRegister("Cleanup")

; Bind to a SOCKET
;==============================================
$socket = UDPBind("127.0.0.1", 65532)
If @error <> 0 Then Exit

While 1
;~ 	sleep(10)
	$ti = TimerInit()
    $data = UDPRecv($socket, 50)
	ConsoleWrite(Round(TimerDiff($ti))&"ms" & @CRLF) 
    If $data <> "" Then
        ConsoleWrite("UDP DATA: "& $data& @CRLF)
    EndIf
WEnd

Func Cleanup()
    UDPCloseSocket($socket)
    UDPShutdown()
EndFunc

Attachments (0)

Change History (4)

comment:1 follow-up: Changed 13 years ago by mvg

mmm, Seems to me that ...

| If this is intended/recommended,
-> Forum, Dev department.

| can there be inserted an option for lowering or removing this 'timeout'?
-> Request.

| I want ...
World peace!

For possible UDPRecv alternatives/workaround/etc -> Forum, General Help.

comment:2 in reply to: ↑ 1 ; follow-up: Changed 13 years ago by qsek

Replying to mvg:
Hi mvg,

| If this is intended/recommended,
-> Forum, Dev department.

The reason of this ticket is to find this out. If one of those are true i'll be glad to make a forum post :)

| can there be inserted an option for lowering or removing this 'timeout'?
-> Request.
For possible UDPRecv alternatives/workaround/etc -> Forum, General Help.

again bound to the "if intended/recommended" which yet has to be confirmed.
As it seems UDPRecv is a builtin Autoit function. I saw a very old post about a TCP/Winsock UDF, and it is fairly complicated.
I dont think it there are many scripter out there, who actually can help me. So before i start to PM the few relevant people and waste their time, i thought it would be better to confirm, if it was a bug or not, which should be a matter of minutes to the competent dev to decide that.

| I want ...
World peace!

Ok my fault, cut the "i want" and insert "It would be more efficient and more suitable for the common sense if it were possible to" :P

Oh and please excuse my unconventional english, its not my first language but i hope i can point out my thoughts good enough.

If i had done something wrong with creating this ticket, so please let me me know and feel free to delete it.

comment:3 in reply to: ↑ 2 Changed 13 years ago by mvg

The reason of this ticket is to find this out. If one of those are true i'll be glad to make a forum post :)

Wrong way around ... Question/not sure/find out. -> forum. (And that don't mean starting to PM'ing (whatever) Users.)
Than when you think your relative sure about it being a bug/artifact. -> Bug report.

<snip>

Create New Ticket
Below are guidelines for creating a new ticket. ...
General Guidelines
...
If you are asking a question you are at the wrong place. Use the forum to ask questions.

Now take that forum detour and get the information you need.

(On hold as far as I'm concerned)

comment:4 Changed 13 years ago by Jpm

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

Repost after forum help
Thanks

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

Action
as closed The ticket will remain with no owner.
Author


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

 
Note: See TracTickets for help on using tickets.