This is an abstract superclass of all objects which represent a TCP/IP
connection based socket.
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)
|