Table of Contents

Class: Connection Twisted-0.19.0/twisted/internet/tcp.py

I am the superclass of all socket-based FileDescriptors.

This is an abstract superclass of all objects which represent a TCP/IP connection based socket.

Base Classes   
abstract.FileDescriptor
protocol.Transport
styles.Ephemeral
Methods   
__init__
_closeSocket
connectionLost
doRead
logPrefix
writeSomeData
  __init__ 
__init__ (
        self,
        skt,
        protocol,
        reactor=None,
        )

  _closeSocket 
_closeSocket ( self )

Called to close our socket.

  connectionLost 
connectionLost ( self )

See abstract.FileDescriptor.connectionLost().

  doRead 
doRead ( self )

Calls self.protocol.dataReceived with all available data.

This reads up to self.bufferSize bytes of data from its socket, then calls self.dataReceived(data) to process it. If the connection is not lost through an error in the physical recv(), this function will return the result of the dataReceived call.

  logPrefix 
logPrefix ( self )

Return the prefix to log with when I own the logging thread.

  writeSomeData 
writeSomeData ( self,  data )

Connection.writeSomeData(data) -> #of bytes written | CONNECTION_LOST This writes as much data as possible to the socket and returns either the number of bytes read (which is positive) or a connection error code (which is negative)


Table of Contents

This document was automatically generated on Sun Jul 14 19:52:41 2002 by HappyDoc version 2.0