Package twisted :: Package internet :: Module ssl :: Class Connection
[show private | hide private]
[frames | no frames]

Class Connection

    Logger --+        
             |        
FileDescriptor --+    
                 |    
     Ephemeral --+    
                 |    
        Connection --+
                     |
                    Connection

Known Subclasses:
Server, Client

I am an SSL connection.
Method Summary
  __init__(self, skt, protocol, reactor)
(inherited from Connection)
  __getstate__(self)
(inherited from Ephemeral)
  __setstate__(self, state)
(inherited from Ephemeral)
  connectionLost(self, reason)
See abstract.FileDescriptor.connectionLost(). (inherited from Connection)
  doRead(self)
See tcp.Connection.doRead for details.
  doWrite(self)
Called when data is available for writing.
  fileno(self)
File Descriptor number for select(). (inherited from FileDescriptor)
  getPeerCertificate(self)
Return the certificate for the peer.
  getTcpNoDelay(self)
(inherited from Connection)
  log(self, bytes)
(inherited from Logger)
  logPrefix(self)
Return the prefix to log with when I own the logging thread. (inherited from Connection)
  loseConnection(self)
Close the connection at the next available opportunity. (inherited from FileDescriptor)
  pauseProducing(self)
(inherited from FileDescriptor)
  registerProducer(self, producer, streaming)
Register to receive data from a producer. (inherited from FileDescriptor)
  resumeProducing(self)
(inherited from FileDescriptor)
  setTcpNoDelay(self, enabled)
(inherited from Connection)
  startReading(self)
Start waiting for read availability. (inherited from FileDescriptor)
  startWriting(self)
Start waiting for write availability. (inherited from FileDescriptor)
  stopConsuming(self)
Stop consuming data. (inherited from FileDescriptor)
  stopProducing(self)
(inherited from FileDescriptor)
  stopReading(self)
Stop waiting for read availability. (inherited from FileDescriptor)
  stopWriting(self)
Stop waiting for write availability. (inherited from FileDescriptor)
  unregisterProducer(self)
Stop consuming data from a producer, without disconnecting. (inherited from FileDescriptor)
  write(self, data)
Reliably write some data. (inherited from FileDescriptor)
  writeSequence(self, iovec)
(inherited from FileDescriptor)
  writeSomeData(self, data)
See tcp.Connection.writeSomeData for details.
  _closeSocket(self)
Called to close our socket.
  _Logger__prefix(self)
(inherited from Logger)
  _postLoseConnection(self)
Gets called after loseConnection(), after buffered data is sent.

Class Variable Summary
tuple __implements__
int readBlockedOnWrite
int sslShutdown
int writeBlockedOnRead

Method Details

doRead(self)

See tcp.Connection.doRead for details.
Overrides:
twisted.internet.tcp.Connection.doRead

doWrite(self)

Called when data is available for writing.

A result that is true (which will be a negative number) implies the connection was lost. A false result implies the connection is still there; a result of 0 implies no write was done, and a result of None indicates that a write was done.
Overrides:
twisted.internet.abstract.FileDescriptor.doWrite (inherited documentation)

getPeerCertificate(self)

Return the certificate for the peer.

writeSomeData(self, data)

See tcp.Connection.writeSomeData for details.
Overrides:
twisted.internet.tcp.Connection.writeSomeData

_closeSocket(self)

Called to close our socket.
Overrides:
twisted.internet.tcp.Connection._closeSocket

_postLoseConnection(self)

Gets called after loseConnection(), after buffered data is sent.

We close the SSL transport layer, and if the other side hasn't closed it yet we start reading, waiting for a ZeroReturnError which will indicate the SSL shutdown has completed.
Overrides:
twisted.internet.abstract.FileDescriptor._postLoseConnection

Class Variable Details

__implements__

Type:
tuple
Value:
(((<class twisted.internet.interfaces.IProducer at 0x10260b40>,
   <class twisted.internet.interfaces.IReadWriteDescriptor at 0x1028f0\
d8>,
   <class twisted.internet.interfaces.IConsumer at 0x101ad5b0>,
   <class twisted.internet.interfaces.ITransport at 0x1027ddc8>),
  <class twisted.internet.interfaces.ITCPTransport at 0x1026db68>),
 <class twisted.internet.interfaces.ISSLTransport at 0x1022ee40>)      

readBlockedOnWrite

Type:
int
Value:
0                                                                      

sslShutdown

Type:
int
Value:
0                                                                      

writeBlockedOnRead

Type:
int
Value:
0                                                                      

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