[Twisted-Python] UDP asynchronous communication
Adrian Libotean
adrian.libotean at asylum-studios.ro
Sun Apr 10 10:18:38 MDT 2005
Tommi Virtanen wrote:
> Adrian Libotean wrote:
>
>> Trust me I've read the document and after:
>>
>> reactor.listenUDP(...)
>> reactor.run()
>>
>> the *client* just waits for incoming traffic.
>
>
> Set up things to happen, then call reactor.run() at the end
> of your main function.
That's the problem: I just want to start the client and then, when the
user selects "Scan" from the interface, I must send the broadcast and
then act on replies from servers completely independent of the main
thread of the application.
So I have two choices: I run the reactor in a separate thread, or I find
a way to do a non-blocking communication using onReceive/onSend events.
> Also, please do not top-post.
Sorry for that.
More information about the Twisted-Python
mailing list