[Twisted-Python] Integrate other API that uses select

Hi, newbie question: I would like to integrate another c-api, that uses select ( for some tcp - connection ); If I could extend this c-api, to question for the bit-arry it uses for the select, could I enter this in the twisted framework to get the control, if some event for these sockets are coming in and then notifiy the c-api to handle the events on his sockets. The aim is to keep the single waiting point in twisted and not being forced to poll on the c-api. Thanks for any help ... Wolfgang

On Fri, 2005-12-23 at 14:23 +0100, Wolfgang Eichler wrote:
Yep - reactor.addReader and reactor.addWriter let you register file descriptors; typically the object you register would be an instance of a subclass of twisted.internet.abstract.FileDescriptor. Well designed C APIs will expose the underlying parsing code in addition to a TCP-specific implementation, and it'd be better to wrap this.

On Fri, 2005-12-23 at 14:23 +0100, Wolfgang Eichler wrote:
Yep - reactor.addReader and reactor.addWriter let you register file descriptors; typically the object you register would be an instance of a subclass of twisted.internet.abstract.FileDescriptor. Well designed C APIs will expose the underlying parsing code in addition to a TCP-specific implementation, and it'd be better to wrap this.
participants (2)
-
Itamar Shtull-Trauring
-
Wolfgang Eichler