Package twisted :: Package internet :: Module default :: Class SelectReactor
[show private | hide private]
[frames | no frames]

Class SelectReactor

 ReactorBase --+    
               |    
PosixReactorBase --+
                   |
                  SelectReactor

Known Subclasses:
PortableGtkReactor, PortableGtkReactor

A select() based reactor - runs on all POSIX platforms and on Win32.
Method Summary
  __init__(self)
(inherited from PosixReactorBase)
  addReader(self, reader)
Add a FileDescriptor for notification of data available to read.
  addSystemEventTrigger(self, phase, eventType, f, *args, **kw)
See twisted.internet.interfaces.IReactorCore.addSystemEventTrigger. (inherited from ReactorBase)
  addWriter(self, writer)
Add a FileDescriptor for notification of data available to write.
  callFromThread(self, f, *args, **kw)
See twisted.internet.interfaces.IReactorCore.callFromThread. (inherited from ReactorBase)
  callInThread(self, callable, *args, **kwargs)
(inherited from ReactorBase)
  callLater(self, seconds, f, *args, **kw)
See twisted.internet.interfaces.IReactorTime.callLater. (inherited from ReactorBase)
  cancelCallLater(self, callID)
See twisted.internet.interfaces.IReactorTime.cancelCallLater. (inherited from ReactorBase)
  clientSSL(self, host, port, protocol, contextFactory, timeout)
Deprecated - use connectSSL instead. (inherited from ReactorBase)
  clientTCP(self, host, port, protocol, timeout)
Deprecated - use connectTCP instead. (inherited from ReactorBase)
  clientUNIX(self, address, protocol, timeout)
Deprecated - use connectUNIX instead. (inherited from ReactorBase)
  connectMulticast(self, remotehost, remoteport, protocol, localport, interface, maxPacketSize)
Connects a ConnectedDatagramProtocol instance to a UDP port. (inherited from PosixReactorBase)
  connectSSL(self, host, port, factory, contextFactory, timeout, bindAddress)
(inherited from PosixReactorBase)
  connectTCP(self, host, port, factory, timeout, bindAddress)
(inherited from PosixReactorBase)
  connectUDP(self, remotehost, remoteport, protocol, localport, interface, maxPacketSize)
Connects a ConnectedDatagramProtocolinstance to a UDP port. (inherited from PosixReactorBase)
  connectUNIX(self, address, factory, timeout)
(inherited from PosixReactorBase)
  crash(self)
See twisted.internet.interfaces.IReactorCore.crash. (inherited from ReactorBase)
  disconnectAll(self)
Disconnect every reader, and writer in the system. (inherited from ReactorBase)
  doIteration(self, timeout, reads, writes, rhk, whk)
Run one iteration of the I/O monitor loop.
  doIteration(self)
Do one iteration over the readers and writers we know about. (inherited from ReactorBase)
  doSelect(self, timeout, reads, writes, rhk, whk)
Run one iteration of the I/O monitor loop.
  fireSystemEvent(self, eventType)
See twisted.internet.interfaces.IReactorCore.fireSystemEvent. (inherited from ReactorBase)
  getDelayedCalls(self)
(inherited from ReactorBase)
  initThreads(self)
(inherited from ReactorBase)
  installResolver(self, resolver)
(inherited from ReactorBase)
  installWaker(self)
Install a `waker' to allow other threads to wake up the IO thread. (inherited from PosixReactorBase)
  iterate(self, delay)
See twisted.internet.interfaces.IReactorCore.iterate. (inherited from ReactorBase)
  listenMulticast(self, port, protocol, interface, maxPacketSize)
Connects a given DatagramProtocol to the given numeric UDP port. (inherited from PosixReactorBase)
  listenSSL(self, port, factory, contextFactory, backlog, interface)
(inherited from PosixReactorBase)
  listenTCP(self, port, factory, backlog, interface)
(inherited from PosixReactorBase)
  listenUDP(self, port, protocol, interface, maxPacketSize)
Connects a given DatagramProtocolto the given numeric UDP port. (inherited from PosixReactorBase)
  listenUNIX(self, address, factory, backlog)
(inherited from PosixReactorBase)
  mainLoop(self)
(inherited from PosixReactorBase)
  removeAll(self)
Remove all readers and writers, and return list of Selectables.
  removeReader(self, reader)
Remove a Selectable for notification of data available to read.
  removeSystemEventTrigger(self, triggerID)
See twisted.internet.interfaces.IReactorCore.removeSystemEventTrigger. (inherited from ReactorBase)
  removeWriter(self, writer)
Remove a Selectable for notification of data available to write.
  resolve(self, name, timeout)
Return a Deferred that will resolve a hostname. (inherited from ReactorBase)
  run(self)
(inherited from PosixReactorBase)
  runUntilCurrent(self)
Run all pending timed calls. (inherited from ReactorBase)
  sigBreak(self, *args)
Handle a SIGBREAK interrupt. (inherited from ReactorBase)
  sigInt(self, *args)
Handle a SIGINT interrupt. (inherited from ReactorBase)
  sigTerm(self, *args)
Handle a SIGTERM interrupt. (inherited from ReactorBase)
  spawnProcess(self, processProtocol, executable, args, env, path, uid, gid, usePTY)
(inherited from PosixReactorBase)
  startRunning(self)
(inherited from PosixReactorBase)
  stop(self)
See twisted.internet.interfaces.IReactorCore.stop. (inherited from ReactorBase)
  suggestThreadPoolSize(self, size)
(inherited from ReactorBase)
  timeout(self)
(inherited from ReactorBase)
  wakeUp(self)
Wake up the event loop. (inherited from ReactorBase)

Class Variable Summary
tuple __implements__

Method Details

addReader(self, reader)

Add a FileDescriptor for notification of data available to read.
Overrides:
twisted.internet.base.ReactorBase.addReader

addWriter(self, writer)

Add a FileDescriptor for notification of data available to write.
Overrides:
twisted.internet.base.ReactorBase.addWriter

doIteration(self, timeout, reads={<twisted.internet.default._UnixWaker instance&nb..., writes={}, rhk=<built-in method has_key of dict&n..., whk=<built-in method has_key of dict&n...)

Run one iteration of the I/O monitor loop.

This will run all selectables who had input or output readiness waiting for them.

doSelect(self, timeout, reads={<twisted.internet.default._UnixWaker instance&nb..., writes={}, rhk=<built-in method has_key of dict&n..., whk=<built-in method has_key of dict&n...)

Run one iteration of the I/O monitor loop.

This will run all selectables who had input or output readiness waiting for them.

removeAll(self)

Remove all readers and writers, and return list of Selectables.
Overrides:
twisted.internet.base.ReactorBase.removeAll

removeReader(self, reader)

Remove a Selectable for notification of data available to read.
Overrides:
twisted.internet.base.ReactorBase.removeReader

removeWriter(self, writer)

Remove a Selectable for notification of data available to write.
Overrides:
twisted.internet.base.ReactorBase.removeWriter

Class Variable Details

__implements__

Type:
tuple
Value:
(((<class twisted.internet.interfaces.IReactorCore at 0x102654d0>,
   <class twisted.internet.interfaces.IReactorTime at 0x10266a20>,
   <class twisted.internet.interfaces.IReactorThreads at 0x10265458>,
   <class twisted.internet.interfaces.IReactorPluggableResolver at 0x1\
02460c0>),
  <class twisted.internet.interfaces.IReactorUNIX at 0x1022ad18>,
  <class twisted.internet.interfaces.IReactorTCP at 0x1022d980>,
  <class twisted.internet.interfaces.IReactorUDP at 0x10249760>,
...                                                                    

Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:25:38 2003 http://epydoc.sf.net