Home | Trees | Index | Help |
---|
Package beepy :: Package transports :: Module tcp :: Class BeepProtocol |
|
BaseProtocol
--+ |Protocol
--+ |LineReceiver
--+ | BeepProtocol
BeepClientProtocol
,
BeepServerProtocol
,
SASLClientProtocol
,
SASLServerProtocol
,
TLSProtocol
Method Summary | |
---|---|
__init__(self)
| |
close(self)
| |
connectionLost(self,
reason)
| |
Called when a connection is made. | |
Performs transport specific channel creation | |
Performs transport specific channel deletion | |
doSEQFrame(self)
| |
Search for a frame in the databuffer. | |
flushDatabuf(self,
channelnum)
| |
This method examines the local data queues to see if there is pending data that didn't fit within a window for a given channel. | |
Perform window size management for inbound SEQ frames. | |
Override this for when raw data is received. | |
sendFrame is used to push frames over the transport. | |
sendMessage is used to send a Message as one or more Frames over the transport. | |
Send the final frame in a sequence of fragments. | |
Send a message fragment by setting the continuation indicator for the frame. | |
This is the simplest tuning. | |
Inherited from LineReceiver | |
Clear buffered data. | |
Protocol.dataReceived. | |
Called when the maximum line length has been reached. | |
Override this for when each line is received. | |
Sends a line to the other end of the connection. | |
Sets the line-mode of this receiver. | |
Sets the raw mode of this receiver. | |
Inherited from Protocol | |
(Deprecated) |
Class Variable Summary | |
---|---|
Inherited from LineReceiver | |
str |
delimiter : The line-ending delimiter to use. |
int |
line_mode = 1 |
int |
MAX_LENGTH : The maximum length of a line to allow (If a sent line is longer than
this, the connection is dropped). |
Inherited from Protocol | |
tuple |
__implements__ = (<class 'twisted.internet.interfaces.IP...
|
Method Details |
---|
connectionMade(self)Called when a connection is made. This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
|
createTransportChannel(self, channelnum)Performs transport specific channel creation |
deleteTransportChannel(self, channelnum)Performs transport specific channel deletion |
findFrame(self)Search for a frame in the databuffer. Return a frame object for the first frame found. |
processQueuedData(self)This method examines the local data queues to see if there is pending data that didn't fit within a window for a given channel. If data is available and there is available space at the remote peer then more data is sent, up to the amount of available space. If no space is available yet (because we haven't received another SEQ frame yet) then we don't send the data for that channel. |
processSEQFrame(self, theframe)Perform window size management for inbound SEQ frames. |
rawDataReceived(self, data)Override this for when raw data is received.
|
sendFrame(self, theframe)sendFrame is used to push frames over the transport. With the addition of SEQ frames, this becomes a little more complex. We need to check that the amount of data we're about to send isn't larger than the allocated window size. If it is, then we fragment the data and only send bytes up to the window size. We then have to wait for a SEQ frame from the remote peer saying that it has room for more data before sending the rest. The sending of pending data happens asynchronously via the processQueuedData() method. |
sendMessage(self, msg, channelnum)sendMessage is used to send a Message as one or more Frames over the transport. |
sendMsgComplete(self, channelnum, msg)Send the final frame in a sequence of fragments. A sequence of fragments may only be one frame long, with that single frame containing the whole message. |
sendMsgFragment(self, channelnum, msg)Send a message fragment by setting the continuation indicator for the frame. |
sendSEQFrame(self, channelnum)This is the simplest tuning. We simply reset the window to max, allowing the remote peer to send more data on this channel. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Thu Sep 30 14:39:24 2004 | http://epydoc.sf.net |