[Twisted-Python] Manually adding a file descriptor to the reactor

Jason Fritcher fritcher at corp.earthlink.net
Wed Aug 3 15:09:53 EDT 2005


I have a C library I've written an extension wrapper around that manages
 connections to an external server for me. When I create a connection
through this library, I get a file descriptor back that I need to
monitor for activity. I've been poking through the twisted code to see
how I can add these file descriptors to the reactor, but I'm just not
seeing how it can be done. My closest guess right now would be to wrap
my file descriptor in a FileDescriptor object, but I'm not seeing how to
add that to the reactor, or how to tell it what code to call when there
is activity on that descriptor. Can anyone give me some insight into
what I need to do, or point me at some documentation that would explain
what I need to do?

For system details, I'll be doing this with Python 2.3.5, Twisted 2.0.1,
on both Mac OS X Tiger, and Red Hat Linux.


Jason Fritcher
Software Engineer
Core Infrastructure Services & Strategy
Earthlink, Inc
fritcher at corp.earthlink.net
(404) 748-7262, x22262
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20050803/4ce9db9e/attachment.pgp 

More information about the Twisted-Python mailing list