Class t.i.t.BaseClient(Connection):

Part of twisted.internet.tcp View Source View In Hierarchy

Known subclasses: twisted.internet.tcp.Client, twisted.internet.unix.Client

A base class for client TCP (and similiar) sockets.
Method _finishInit Called by base classes to continue to next stage of initialization.
Method startTLS Undocumented
Method stopConnecting Stop attempt to connect.
Method failIfNotConnected Generic method called when the attemps to connect failed. It basically
Method createInternetSocket (internal) Create a non-blocking socket using
Method resolveAddress Undocumented
Method _setRealAddress Undocumented
Method doConnect I connect the socket.
Method _connectDone Undocumented
Method connectionLost See abstract.FileDescriptor.connectionLost().

Inherited from Connection:

Method __init__ Undocumented
Method _startTLS Undocumented
Method getHandle Return the socket for this connection.
Method doRead Calls self.protocol.dataReceived with all available data.
Method writeSomeData Connection.writeSomeData(data) -> #of bytes written | CONNECTION_LOST
Method _closeWriteConnection Undocumented
Method readConnectionLost Indicates read connection was lost.
Method logPrefix Return the prefix to log with when I own the logging thread.
Method getTcpNoDelay Return if TCP_NODELAY is enabled.
Method setTcpNoDelay Enable/disable TCP_NODELAY.
Method getTcpKeepAlive Return if SO_KEEPALIVE enabled.
Method setTcpKeepAlive Enable/disable SO_KEEPALIVE.

Inherited from FileDescriptor (via Connection):

Method doWrite Called when data can be written.
Method _postLoseConnection Called after a loseConnection(), when all data has been written.
Method writeConnectionLost Indicates write connection was lost.
Method write Reliably write some data.
Method writeSequence Reliably write a sequence of data.
Method loseConnection Close the connection at the next available opportunity.
Method loseWriteConnection Undocumented
Method stopReading Stop waiting for read availability.
Method stopWriting Stop waiting for write availability.
Method startReading Start waiting for read availability.
Method startWriting Start waiting for write availability.
Method registerProducer Register to receive data from a producer.
Method unregisterProducer Stop consuming data from a producer, without disconnecting.
Method stopConsuming Stop consuming data.
Method resumeProducing Undocumented
Method pauseProducing Undocumented
Method stopProducing Stop producing data.
Method fileno File Descriptor number for select().

Inherited from Ephemeral (via Connection, FileDescriptor):

Method __getstate__ Undocumented
Method __setstate__ Undocumented

Inherited from _SocketCloser (via Connection):

Method _closeSocket Undocumented
def _finishInit(self, whenDone, skt, error, reactor): (source)
Called by base classes to continue to next stage of initialization.
def startTLS(self, ctx, client=1): (source)
Undocumented
def stopConnecting(self): (source)
Stop attempt to connect.
def failIfNotConnected(self, err): (source)
Generic method called when the attemps to connect failed. It basically cleans everything it can: call connectionFailed, stop read and write, delete socket related members.
def createInternetSocket(self): (source)
(internal) Create a non-blocking socket using self.addressFamily, self.socketType.
def resolveAddress(self): (source)
Undocumented
def _setRealAddress(self, address): (source)
Undocumented
def doConnect(self): (source)

I connect the socket.

Then, call the protocol's makeConnection, and start waiting for data.
def _connectDone(self): (source)
Undocumented
def connectionLost(self, reason): (source)
See abstract.FileDescriptor.connectionLost().
API Documentation for twisted, generated by pydoctor.