Use twisted event loop in plugin
Posted: Thu Mar 03, 2011 6:21 pm
Hi Guys,
I am learning to write plugin for deluge. Now, I have a question about how to use twisted event loop in plugin? For example, If I want to connect to daemon in client, I need methods such as client.connect(), addCallback, addErrback and reactor.run(). But, In the plugin, the structure is different, I don't know where I should put the reactor.run(). It doesn't seem to work when I put reactor.run() in the plugin. Could anyone give me some ideas?
Zack
I am learning to write plugin for deluge. Now, I have a question about how to use twisted event loop in plugin? For example, If I want to connect to daemon in client, I need methods such as client.connect(), addCallback, addErrback and reactor.run(). But, In the plugin, the structure is different, I don't know where I should put the reactor.run(). It doesn't seem to work when I put reactor.run() in the plugin. Could anyone give me some ideas?
Zack