| Home | Trees | Indices | Help |
|
|---|
|
|
twisted.internet.protocol.Factory --+
|
twisted.internet.protocol.ServerFactory --+
|
Listener
I am responsible for a single listening port, which may connect to multiple Tubs. I have a strports-based Service, which I will attach as a child of one of my Tubs. If that Tub disconnects, I will reparent the Service to a remaining one.
Unauthenticated Tubs use a TubID of 'None'. There may be at most one such Tub attached to any given Listener.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
noisy = False
|
|||
|
Inherited from |
|||
|
|||
|
When this Listener was created with a strport string of '0' or 'tcp:0' (meaning 'please allocate me something'), and if the Listener is active (it is attached to a Tub which is in the 'running' state), this method will return the port number that was allocated. This is useful for the following pattern:
t = Tub()
l = t.listenOn('tcp:0')
t.setLocation('localhost:%d' % l.getPortnum())
|
This will be called before I begin listening on a Port or Connector. It will only be called once, even if the factory is connected to multiple ports. This can be used to perform 'unserialization' tasks that are best put off until things are actually running, such as connecting to a database, opening files, etcetera.
|
This will be called before I stop listening on all Ports/Connectors. This can be overridden to perform 'shutdown' tasks such as disconnecting database connections, closing files, etc. It will be called, for example, before an application shuts down, if it was connected to a port. User code should not call this function directly.
|
Return a Broker attached to me (as the service provider).
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Oct 14 18:27:48 2008 | http://epydoc.sourceforge.net |