Home | Trees | Index | Help |
---|
Package twisted :: Package internet :: Module tcp :: Class Port |
|
Logger
--+ |FileDescriptor
--+ | Port
Port
I am a TCP server port, listening for connections.
When a connection is accepted, I will call my factory's buildProtocol with the incoming connection as an argument, according to the specification described in twisted.protocols.protocol.Factory.
If you wish to change the sort of transport that will be used, my `transport' attribute will be called with the signature expected for Server.__init__, so it can be replaced.Method Summary | |
---|---|
Initialize with a numeric port to listen on. | |
(internal) get my state for persistence | |
__repr__(self)
| |
Cleans up my socket. | |
(internal) create an AF_INET socket. | |
Called when my socket is ready for reading. | |
Raises an AssertionError. | |
File Descriptor number for select(). (inherited from FileDescriptor )
| |
Returns a tuple of ('INET', hostname, port). | |
(inherited from Logger )
| |
Returns the name of my class, to prefix log entries with. | |
Stop accepting connections on this port. | |
(inherited from FileDescriptor )
| |
Register to receive data from a producer. (inherited from FileDescriptor )
| |
(inherited from FileDescriptor )
| |
Create and bind my socket, and begin listening on it. | |
Start waiting for read availability. (inherited from FileDescriptor )
| |
Start waiting for write availability. (inherited from FileDescriptor )
| |
Stop consuming data. (inherited from FileDescriptor )
| |
Stop accepting connections on this port. | |
(inherited from FileDescriptor )
| |
Stop waiting for read availability. (inherited from FileDescriptor )
| |
Stop waiting for write availability. (inherited from FileDescriptor )
| |
Stop consuming data from a producer, without disconnecting. (inherited from FileDescriptor )
| |
Reliably write some data. (inherited from FileDescriptor )
| |
(inherited from FileDescriptor )
| |
Write as much as possible of the given data, immediately. (inherited from FileDescriptor )
| |
(inherited from Logger )
| |
Called after a loseConnection(), when all data has been written. (inherited from FileDescriptor )
|
Class Variable Summary | |
---|---|
int |
backlog
|
str |
interface
|
class |
Server
|
int |
sessionno
|
NoneType |
unixsocket
|
Method Details |
---|
__init__(self,
port,
factory,
backlog=5,
interface='',
reactor=None)
Initialize with a numeric port to listen on.
|
__getstate__(self)(internal) get my state for persistence |
connectionLost(self, reason)Cleans up my socket. |
createInternetSocket(self)(internal) create an AF_INET socket. |
doRead(self)Called when my socket is ready for reading. This accepts a connection and calls self.protocol() to handle the wire-level protocol. |
doWrite(self)Raises an AssertionError. |
getHost(self)Returns a tuple of ('INET', hostname, port). This indicates the servers address. |
logPrefix(self)Returns the name of my class, to prefix log entries with.
|
loseConnection(self)Stop accepting connections on this port. This will shut down my socket and call self.connectionLost(). |
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. |
stopListening(self)Stop accepting connections on this port. This will shut down my socket and call self.connectionLost(). |
Class Variable Details |
---|
backlog
|
interface
|
ServerServer = twisted.internet.tcp.Server
|
sessionno
|
unixsocket
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:28:15 2003 | http://epydoc.sf.net |