El 26/9/19 a les 19:14, S.C.T.N Gmbh ha escrit:
Thank you for your answer.
WaitingData(Ex) is for me a very important function as it is also used in
TUDPBlockSocket.
I have for example, 40 hosts that send UDP datagrams of constant length
(10byte) asynchronosly to my application.
In a repeat..until block I loop through all the 40 UDP sockets.
If WaitingData<10 then I loop to the next. If WaitingDate=10 then I use one
of the recv.. functions with 10ms timeout to get the data and process it.
This loop should be done in less than 1ms.
But when I use the recv(1).. function without WaitingData and only a timeout
(let us say 1ms) then I would lose 40ms when no data is received in the
loop?
You can use RecvPacket(0)
(btw, udp is not a stream protocol, so, in your case, you either get 10
bytes or none at all).
Bye
--
Luca
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public