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

Class Connection

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

Known Subclasses:
Client, Server

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.

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.

_closeSocket(self)

Called to close our socket.

_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.

Class Variable Details

__implements__

Type:
tuple
Value:
(((<class twisted.internet.interfaces.IProducer at 0x82053c4>,
   <class twisted.internet.interfaces.IReadWriteDescriptor at 0x8241f8\
4>,
   <class twisted.internet.interfaces.IConsumer at 0x8241fb4>,
   <class twisted.internet.interfaces.ITransport at 0x8196f9c>),
  <class twisted.internet.interfaces.ITCPTransport at 0x819b19c>),
 <class twisted.internet.interfaces.ISSLTransport at 0x8198a14>)       

readBlockedOnWrite

Type:
int
Value:
0                                                                      

sslShutdown

Type:
int
Value:
0                                                                      

writeBlockedOnRead

Type:
int
Value:
0                                                                      

Generated by Epydoc 1.1 on Thu Apr 17 12:55:12 2003 http://epydoc.sf.net