Francois Piette wrote: >> Also, if I do not use some kind of a wait function >> in order to make a request blocking (like WaitUntilReady), >> it's mandatory to use a timer, correct? > > Sorry, I don't understand.
Indeed badly expressed, I had the STUN proto in mind when I wrote it. In STUN, reliability is accomplished through client retransmissions. If no response is received by 1.6 seconds after the last request has been sent, the client SHOULD consider the transaction to have failed. In other words, requests would be sent at times 0ms, 100ms, 300ms, 700ms, 1500ms, 3100ms, 4700ms, 6300ms, and 7900ms. At 9500ms, the client considers the transaction to have failed if no response has been received. I do not know how to write this as an async component method w/o a timer, but I can write it as a sync method by some wait function which processes messages and either starts retransmissions or triggers a final timeout when no response hasbeen received. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html > Contribute to the SSL Effort. Visit > http://www.overbyte.be/eng/ssl.html -- > [EMAIL PROTECTED] > Author of ICS (Internet Component Suite, freeware) > Author of MidWare (Multi-tier framework, freeware) > http://www.overbyte.be > > ----- Original Message ----- > From: "Arno Garrels" <[EMAIL PROTECTED]> > To: "ICS support mailing" <firstname.lastname@example.org> > Sent: Thursday, August 17, 2006 10:27 AM > Subject: [twsocket] UDP request/response proto > > >> Hello, >> >> I UDP sendto a request datagram to the server, >> when OnDataAvailable triggers I call ReceiveFrom() >> in order to read the response. >> But I think OnDataAvailable is being triggered when >> any datagram addressed to that port arrives, even >> datagrams not sent by the destination server. How >> to handle this situation when some data arrive from >> and unexpected sender? Should I consider a pending >> request as failed or should I just ignore such packets? >> >> Also, if I do not use some kind of a wait function >> in order to make a request blocking (like WaitUntilReady), >> it's mandatory to use a timer, correct? >> >> --- >> Arno Garrels [TeamICS] >> http://www.overbyte.be/eng/overbyte/teamics.html >> >> -- >> To unsubscribe or change your settings for TWSocket mailing list >> please goto http://www.elists.org/mailman/listinfo/twsocket >> Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be