Part of twisted.internet.protocol View Source View In Hierarchy
Known subclasses: twisted.conch.client.agent.SSHAgentForwardingLocal, twisted.conch.insults.client.InsultsClient, twisted.conch.insults.helper.TerminalBuffer, twisted.conch.insults.insults.ClientProtocol, twisted.conch.insults.insults.ServerProtocol, twisted.conch.ssh.agent.SSHAgentClient, twisted.conch.ssh.agent.SSHAgentServer, twisted.conch.ssh.filetransfer.FileTransferBase, twisted.conch.ssh.forwarding.SSHForwardingClient, twisted.conch.ssh.session.SSHSessionClient, twisted.conch.ssh.transport.SSHTransportBase, twisted.conch.telnet.Telnet, twisted.conch.telnet.TelnetProtocol, twisted.internet.endpoints._WrappingProtocol, twisted.names.dns.DNSProtocol, twisted.protocols.basic.IntNStringReceiver, twisted.protocols.basic.LineOnlyReceiver, twisted.protocols.basic.LineReceiver, twisted.protocols.basic.NetstringReceiver, twisted.protocols.ftp.DTP, twisted.protocols.ftp.ProtocolWrapper, twisted.protocols.ftp.SenderProtocol, twisted.protocols.gps.rockwell.Zodiac, twisted.protocols.mice.mouseman.MouseMan, twisted.protocols.policies.ProtocolWrapper, twisted.protocols.portforward.Proxy, twisted.protocols.socks.SOCKSv4, twisted.protocols.socks.SOCKSv4Incoming, twisted.protocols.socks.SOCKSv4Outgoing, twisted.protocols.stateful.StatefulProtocol, twisted.protocols.telnet.Telnet, twisted.protocols.wire.Chargen, twisted.protocols.wire.Daytime, twisted.protocols.wire.Discard, twisted.protocols.wire.Echo, twisted.protocols.wire.QOTD, twisted.protocols.wire.Time, twisted.protocols.wire.Who, twisted.runner.inetd.InetdProtocol, twisted.spread.banana.Banana, twisted.web._newclient.HTTP11ClientProtocol, twisted.web.sux.XMLParser, twisted.web2.channel.cgi.BaseCGIChannelRequest, twisted.web2.channel.http.OverloadedServerProtocol, twisted.words.protocols.irc.DccFileReceiveBasic, twisted.words.protocols.irc.DccSendProtocol, twisted.words.protocols.irc.IRC, twisted.words.protocols.oscar.OscarConnection, twisted.words.protocols.toc.GetFileTransfer, twisted.words.protocols.toc.SendFileTransfer, twisted.words.protocols.toc.TOC, twisted.words.protocols.toc.TOCClient, twisted.words.xish.xmlstream.XmlStream
Implements interfaces: twisted.internet.interfaces.IProtocol
Method | dataReceived | Called whenever data is received. |
Method | connectionLost | Called when the connection is shut down. |
Inherited from BaseProtocol:
Method | makeConnection | Make a connection to a transport and a server. |
Method | connectionMade | Called when a connection is made. |
Called whenever data is received.
Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.Parameters | data | a string of indeterminate length. Please keep in mind that you will probably need to buffer some data, as partial (or multiple) protocol messages may be received! I recommend that unit tests for protocols call through to this method with differing chunk sizes, down to one byte at a time. |
Called when the connection is shut down.
Clear any circular references here, and any external references to this Protocol. The connection has been closed.Parameters | reason | (type: twisted.python.failure.Failure
) |