[Twisted-Python] UDP servers and socket queues

Bob Ippolito bob at redivi.com
Mon Apr 21 08:54:40 MDT 2003


On Monday, Apr 21, 2003, at 10:26 America/New_York, Phil Mayers wrote:

> ...the problem is that the responses come back too fast - they overflow
> the UDP socket buffer after a couple of hundred packets. So, try this:
>
> proto = RPCProtocol()
> for host in hosts:
>     ep = endpoint(proto, host)
>     reactor.callLater(0, ep.go)
>
> ...except that the default SelectReactor will always execute any
> pendingTimedCalls before calling doIteration (where the select() call
> actually happens).

Have you tried doing reactor.callLater(smallFloatButNotZero, ep.go)?  
If you use a small number it typically won't happen in that iteration.

-bob





More information about the Twisted-Python mailing list