Package twisted :: Package internet :: Module cfreactor

[frames | no frames]

## Module twisted.internet.cfreactor

This module provides support for Twisted to interact with CoreFoundation CFRunLoops. This includes Cocoa's NSRunLoop.

In order to use this support, simply do the following:

       |  from twisted.internet import cfreactor
       |  cfreactor.install()

Then use the twisted.internet APIs as usual. The other methods here are not intended to be called directly under normal use. However, install can take a runLoop kwarg, and run will take a withRunLoop arg if you need to explicitly pass a CFRunLoop for some reason. Otherwise it will make a pretty good guess as to which runLoop you want (the current NSRunLoop if PyObjC is imported, otherwise the current CFRunLoop. Either way, if one doesn't exist, it will be created).

API Stability: stable

Maintainer: Bob Ippolito

Classes
`CFReactor` |
`SelectableSocketWrapper` |

Function Summary
| ``install`(runLoop)` Configure the twisted mainloop to be run inside CFRunLoop.

Variable Summary
`dict` | `_faildict` = `{<class twisted.internet.error.ConnectionLos...`

Function Details

### install(runLoop=None)

Configure the twisted mainloop to be run inside CFRunLoop.

Variable Details

### _faildict

  Type:
    `dict`
  Value:

        {<class twisted.internet.error.ConnectionLost at 0x8263364>: <twisted.\
        python.failure.Failure twisted.internet.error.ConnectionLost>,
         <class twisted.internet.error.ConnectionDone at 0x826734c>: <twisted.\
        python.failure.Failure twisted.internet.error.ConnectionDone>}

Generated by Epydoc 2.0 on Sat May 15 20:07:57 2004 | http://epydoc.sf.net