Package twisted :: Package internet :: Module interfaces :: Class IProtocolFactory

[show private | hide private]
[frames | no frames]

## Class IProtocolFactory

    Interface --+
                |
               IProtocolFactory

Interface for protocol factories.

Method Summary
| ``buildProtocol`(self, addr)` Return an object implementing IProtocol, or None.
| ``doStart`(self)` Called every time this is connected to a Port or Connector.
| ``doStop`(self)` Called every time this is unconnected from a Port or Connector.

Method Details

### buildProtocol(self, addr)

Return an object implementing IProtocol, or None.

This method will be called when a connection has been established to addr.

If None is returned, the connection is assumed to have been refused, and the Port will close the connection.

TODO:

- Document 'addr' argument -- what format is it in?
- Is the phrase "incoming server connection" correct when Factory is a ClientFactory?

### doStart(self)

Called every time this is connected to a Port or Connector.

### doStop(self)

Called every time this is unconnected from a Port or Connector.

Generated by Epydoc 1.1 on Sat Feb 15 21:17:51 2003 | http://epydoc.sf.net