[Twisted-Python] Resending a UDP datagram if a response is not received

Jean-Paul Calderone exarkun at divmod.com
Mon May 7 11:45:58 EDT 2007


On Mon, 7 May 2007 11:32:55 -0400, "Gaspard, Bradley S." <bradley.s.gaspard at saic.com> wrote:
>I am trying to write a client to an existing UDP server that requires a couple of data exchanges before the transaction is complete. Should any of the client's requests go unanswered I would like to resend the request after a timeout period. Perhaps something could be done with reactor.callLater to see if a response had been received but is there a better way to do this?

That sounds like just the way to go about it.

>
>Any pointers/examples would be greatly appreciated. TCP is not an option.

You might want to take a look at the retry logic in the DNS client in
twisted.names.client.

Jean-Paul




More information about the Twisted-Python mailing list