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

Class PosixReactorBase

ReactorBase --+
              |
             PosixReactorBase

Known Subclasses:
SelectReactor, Gtk2Reactor, GtkReactor, PollReactor, Win32Reactor

A basis for reactors that use file descriptors.
Method Summary
  __init__(self)
(inherited from ReactorBase)
  addReader(self, reader)
(inherited from ReactorBase)
  addSystemEventTrigger(self, phase, eventType, f, *args, **kw)
See twisted.internet.interfaces.IReactorCore.addSystemEventTrigger. (inherited from ReactorBase)
  addWriter(self, writer)
(inherited from ReactorBase)
  callFromThread(self, f, *args, **kw)
See twisted.internet.interfaces.IReactorThreads.callFromThread. (inherited from ReactorBase)
  callInThread(self, callable, *args, **kwargs)
See twisted.internet.interfaces.IReactorThreads.callInThread. (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.
  connectSSL(self, host, port, factory, contextFactory, timeout, bindAddress)
  connectTCP(self, host, port, factory, timeout, bindAddress)
  connectUDP(self, remotehost, remoteport, protocol, localport, interface, maxPacketSize)
Connects a ConnectedDatagramProtocolinstance to a UDP port.
  connectUNIX(self, address, factory, timeout)
  connectWith(self, connectorType, *args, **kw)
  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)
Do one iteration over the readers and writers we know about. (inherited from ReactorBase)
  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.
  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.
  listenSSL(self, port, factory, contextFactory, backlog, interface)
  listenTCP(self, port, factory, backlog, interface)
  listenUDP(self, port, protocol, interface, maxPacketSize)
Connects a given DatagramProtocolto the given numeric UDP port.
  listenUNIX(self, address, factory, backlog, mode)
  listenWith(self, portType, *args, **kw)
  mainLoop(self)
  removeAll(self)
(inherited from ReactorBase)
  removeReader(self, reader)
(inherited from ReactorBase)
  removeSystemEventTrigger(self, triggerID)
See twisted.internet.interfaces.IReactorCore.removeSystemEventTrigger. (inherited from ReactorBase)
  removeWriter(self, writer)
(inherited from ReactorBase)
  resolve(self, name, timeout)
Return a Deferred that will resolve a hostname. (inherited from ReactorBase)
  run(self, installSignalHandlers)
  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)
  startRunning(self, installSignalHandlers)
  stop(self)
See twisted.internet.interfaces.IReactorCore.stop. (inherited from ReactorBase)
  suggestThreadPoolSize(self, size)
See twisted.internet.interfaces.IReactorThreads.suggestThreadPoolSize. (inherited from ReactorBase)
  timeout(self)
(inherited from ReactorBase)
  wakeUp(self)
Wake up the event loop. (inherited from ReactorBase)
  _cbContinueSystemEvent(self, result, eventType)
(inherited from ReactorBase)
  _continueSystemEvent(self, eventType)
(inherited from ReactorBase)
  _handleSigchld(self, signum, frame)
Reap all processes on SIGCHLD.
  _handleSignals(self)
Install the signal handlers for the Twisted event loop.
  _initThreadPool(self)
(inherited from ReactorBase)
  _internalResolve(self, name, timeout)
(inherited from ReactorBase)
  _resetCallLater(self, tple)
(inherited from ReactorBase)

Class Variable Summary
tuple __implements__

Method Details

connectMulticast(self, remotehost, remoteport, protocol, localport=0, interface='', maxPacketSize=8192)

Connects a ConnectedDatagramProtocol instance to a UDP port.

EXPERIMENTAL.

connectSSL(self, host, port, factory, contextFactory, timeout=30, bindAddress=None)

See also: twisted.internet.interfaces.IReactorSSL.connectSSL

connectTCP(self, host, port, factory, timeout=30, bindAddress=None)

See also: twisted.internet.interfaces.IReactorTCP.connectTCP

connectUDP(self, remotehost, remoteport, protocol, localport=0, interface='', maxPacketSize=8192)

Connects a ConnectedDatagramProtocol instance to a UDP port.

EXPERIMENTAL.

connectUNIX(self, address, factory, timeout=30)

See also: twisted.internet.interfaces.IReactorUNIX.connectUNIX

installWaker(self)

Install a `waker' to allow other threads to wake up the IO thread.

listenMulticast(self, port, protocol, interface='', maxPacketSize=8192)

Connects a given DatagramProtocol to the given numeric UDP port.

EXPERIMENTAL.
Returns:
object conforming to IListeningPort.

listenSSL(self, port, factory, contextFactory, backlog=5, interface='')

See also: twisted.internet.interfaces.IReactorSSL.listenSSL

listenTCP(self, port, factory, backlog=5, interface='')

See also: twisted.internet.interfaces.IReactorTCP.listenTCP

listenUDP(self, port, protocol, interface='', maxPacketSize=8192)

Connects a given DatagramProtocol to the given numeric UDP port.

EXPERIMENTAL.
Returns:
object conforming to IListeningPort.

listenUNIX(self, address, factory, backlog=5, mode=438)

See also: twisted.internet.interfaces.IReactorUNIX.listenUNIX

_handleSigchld(self, signum, frame)

Reap all processes on SIGCHLD.

This gets called on SIGCHLD. We do no processing inside a signal handler, as the calls we make here could occur between any two python bytecode instructions. Deferring processing to the next eventloop round prevents us from violating the state constraints of arbitrary classes. Note that a Reactor must be able to accept callLater calls at any time, even interleaved inside it's own methods; it must block SIGCHLD if it is unable to guarantee this.

_handleSignals(self)

Install the signal handlers for the Twisted event loop.

Class Variable Details

__implements__

Type:
tuple
Value:
((<class twisted.internet.interfaces.IReactorCore at 0x823826c>,
  <class twisted.internet.interfaces.IReactorTime at 0x823f47c>,
  <class twisted.internet.interfaces.IReactorThreads at 0x823c9cc>,
  <class twisted.internet.interfaces.IReactorPluggableResolver at 0x82\
442cc>),
 <class twisted.internet.interfaces.IReactorArbitrary at 0x823e92c>,
 <class twisted.internet.interfaces.IReactorTCP at 0x823dbcc>,
 <class twisted.internet.interfaces.IReactorUDP at 0x823742c>,
...                                                                    

Generated by Epydoc 1.1 on Fri Jun 27 03:48:07 2003 http://epydoc.sf.net