Package twisted :: Package internet :: Module unix :: Class Port
[show private | hide private]
[frames | no frames]

Type Port

     _SocketCloser --+    
                     |    
 Ephemeral --+       |    
             |       |    
    Logger --+       |    
             |       |    
    object --+       |    
             |       |    
FileDescriptor --+   |    
                 |   |    
          BasePort --+    
                     |    
                  Port --+
                         |
                        Port

Known Subclasses:
FDPort

Method Summary
  __init__(self, fileName, factory, backlog, mode, reactor, wantPID)
  __repr__(self)
  connectionLost(self, reason)
Cleans up my socket.
  getHost(self)
Returns a UNIXAddress.
  startListening(self)
Create and bind my socket, and begin listening on it.
  _buildAddr(self, name)
    Inherited from Port
  createInternetSocket(self)
  doRead(self)
Called when my socket is ready for reading.
  logPrefix(self)
Returns the name of my class, to prefix log entries with.
  loseConnection(self, connDone)
Stop accepting connections on this port.
  stopListening(self, connDone)
Stop accepting connections on this port.
  _preMakeConnection(self, transport)
    Inherited from BasePort
  doWrite(self)
Raises a RuntimeError
    Inherited from FileDescriptor
  fileno(self)
File Descriptor number for select().
  loseWriteConnection(self)
  pauseProducing(self)
  readConnectionLost(self, reason)
  registerProducer(self, producer, streaming)
Register to receive data from a producer.
  resumeProducing(self)
  startReading(self)
Start waiting for read availability.
  startWriting(self)
Start waiting for write availability.
  stopConsuming(self)
Stop consuming data.
  stopProducing(self)
  stopReading(self)
Stop waiting for read availability.
  stopWriting(self)
Stop waiting for write availability.
  unregisterProducer(self)
Stop consuming data from a producer, without disconnecting.
  write(self, data)
Reliably write some data.
  writeConnectionLost(self, reason)
  writeSequence(self, iovec)
  writeSomeData(self, data)
Write as much as possible of the given data, immediately.
  _closeWriteConnection(self)
  _postLoseConnection(self)
Called after a loseConnection(), when all data has been written.
    Inherited from Ephemeral
  __getstate__(self)
  __setstate__(self, state)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)
    Inherited from _SocketCloser
  _closeSocket(self)

Class Variable Summary
int addressFamily = 1                                                                     
NoneType lockFile = None                                                                  
int socketType = 1                                                                     
type transport = twisted.internet.unix.Server
    Inherited from Port
Implements __implemented__ = <implementedBy twisted.internet.tcp.Po...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
int backlog = 50                                                                    
str interface = ''
int sessionno = 0                                                                     
NoneType _realPortNumber = None                                                                  
    Inherited from FileDescriptor
int bufferSize = 65536                                                                 
int connected = 0                                                                     
str dataBuffer = ''
int disconnected = 0                                                                     
int disconnecting = 0                                                                     
int offset = 0                                                                     
NoneType producer = None                                                                  
int producerPaused = 0                                                                     
int SEND_LIMIT = 131072                                                                
int streamingProducer = 0                                                                     
bool _writeDisconnected = False
bool _writeDisconnecting = False
    Inherited from Logger
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
    Inherited from _SocketCloser
str _socketShutdownMethod = 'shutdown'

Method Details

connectionLost(self, reason)

Cleans up my socket.
Overrides:
twisted.internet.tcp.Port.connectionLost (inherited documentation)

getHost(self)

Returns a UNIXAddress.

This indicates the server's address.
Overrides:
twisted.internet.tcp.Port.getHost

startListening(self)

Create and bind my socket, and begin listening on it.

This is called on unserialization, and must be called after creating a server to begin listening on the specified port.
Overrides:
twisted.internet.tcp.Port.startListening

Class Variable Details

addressFamily

Type:
int
Value:
1                                                                     

lockFile

Type:
NoneType
Value:
None                                                                  

socketType

Type:
int
Value:
1                                                                     

Generated by Epydoc 2.1 on Sun Oct 26 16:39:17 2008 http://epydoc.sf.net