Package twisted :: Package internet :: Module tcp :: Class Client
[show private | hide private]
[frames | no frames]

Class Client

    Logger --+            
             |            
 Ephemeral --+            
             |            
FileDescriptor --+        
                 |        
        Connection --+    
                     |    
            BaseClient --+
                         |
                        Client

Known Subclasses:
Client

A TCP client.
Method Summary
  __init__(self, host, port, bindAddress, connector, reactor)
  __getstate__(self)
(inherited from Ephemeral)
  __repr__(self)
  __setstate__(self, state)
(inherited from Ephemeral)
  connectionLost(self, reason)
See abstract.FileDescriptor.connectionLost(). (inherited from BaseClient)
  createInternetSocket(self)
(internal) Create a non-blocking socket using self.addressFamily, self.socketType. (inherited from BaseClient)
  doConnect(self)
I connect the socket. (inherited from BaseClient)
  doRead(self)
Calls self.protocol.dataReceived with all available data. (inherited from Connection)
  doWrite(self)
Called when data is available for writing. (inherited from FileDescriptor)
  failIfNotConnected(self, err)
(inherited from BaseClient)
  fileno(self)
File Descriptor number for select(). (inherited from FileDescriptor)
  getHost(self)
Returns a tuple of ('INET', hostname, port).
  getPeer(self)
Returns a tuple of ('INET', hostname, port).
  getTcpNoDelay(self)
(inherited from Connection)
  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)
  resolveAddress(self)
(inherited from BaseClient)
  resumeProducing(self)
(inherited from FileDescriptor)
  setTcpNoDelay(self, enabled)
(inherited from Connection)
  startReading(self)
Start waiting for read availability. (inherited from FileDescriptor)
  startTLS(self, ctx, client)
(inherited from BaseClient)
  startWriting(self)
Start waiting for write availability. (inherited from FileDescriptor)
  stopConnecting(self)
Stop attempt to connect. (inherited from BaseClient)
  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)
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) (inherited from Connection)

Method Details

getHost(self)

Returns a tuple of ('INET', hostname, port).

This indicates the address from which I am connecting.

getPeer(self)

Returns a tuple of ('INET', hostname, port).

This indicates the address that I am connected to.

Generated by Epydoc 1.1 on Thu May 8 13:16:29 2003 http://epydoc.sf.net