Home | Trees | Index | Help |
---|
Package twisted :: Package protocols :: Module gnutella :: Class GnutellaPonger |
|
BaseProtocol
--+ |Protocol
--+ |LineReceiver
--+ |GnutellaTalker
--+ | GnutellaPonger
Method Summary | |
---|---|
__init__(self)
| |
(Deprecated) (inherited from Protocol )
| |
Called when the connection is shut down. (inherited from Protocol )
| |
Called when a connection is made. (inherited from GnutellaTalker )
| |
Protocol.dataReceived. (inherited from LineReceiver )
| |
A Gnutella descriptor has arrived. (inherited from GnutellaTalker )
| |
A ping message has arrived. (inherited from GnutellaTalker )
| |
handlePong(self,
descriptorId,
ttl,
hops,
payload)
(inherited from GnutellaTalker )
| |
handlePush(self,
descriptorId,
ttl,
hops,
payload)
(inherited from GnutellaTalker )
| |
handleQuery(self,
descriptorId,
ttl,
hops,
payload)
(inherited from GnutellaTalker )
| |
handleQueryHit(self,
descriptorId,
ttl,
hops,
payload)
(inherited from GnutellaTalker )
| |
Called when the maximum line length has been reached. (inherited from LineReceiver )
| |
Precondition: We must be expecting a GNUTELLA CONNECT handshake move.: (self.initiator and (self.handshake == "initiatorsaidhello")) or ((not self.initiator) and (self.handshake == "start")): "self.initiator: %s, self.handshake: %s, line: %s" % (str(self.initiator), str(self.handshake), str(line),) (inherited from GnutellaTalker )
| |
Make a connection to a transport and a server. (inherited from BaseProtocol )
| |
Override this to handle ping messages. | |
Override this to handle pong messages. (inherited from GnutellaTalker )
| |
Override this to handle push messages. (inherited from GnutellaTalker )
| |
Override this to handle query hit messages. (inherited from GnutellaTalker )
| |
Override this to handle query messages. (inherited from GnutellaTalker )
| |
Override this for when raw data is received. (inherited from GnutellaTalker )
| |
Precondition: descriptorId must be a string of length DESCRIPTORLENGTH.: (type(descriptorId) is types.StringType) and (len(descriptorId) == DESCRIPTORLENGTH): "descriptorId: %s :: %s" % (repr(descriptorId), str(type(descriptorId)),) Precondition: payload must not be larger than MAXUINT32 bytes.: len(payload) <= MAXUINT32: "len(payload): %s" (inherited from GnutellaTalker )
| |
Sends a line to the other end of the connection. (inherited from LineReceiver )
| |
Precondition: ttl must be > 0 and <= MAXUINT8.: (ttl > 0) and (ttl <= MAXUINT8): "ttl: %s" % str(ttl) (inherited from GnutellaTalker )
| |
Precondition: ttl must be > 0 and <= MAXUINT8.: (ttl > 0) and (ttl <= MAXUINT8): "ttl: %s" % str(ttl) Precondition: descriptorId must be a string of length DESCRIPTORLENGTH.: (type(descriptorId) is types.StringType) and (len(descriptorId) == DESCRIPTORLENGTH): "descriptorId: %s :: %s" % (repr(descriptorId), str(type(descriptorId)),) Precondition: host must be a well-formed IPv4 address.: is_ipv4(host): "host: %s" % str(host) Precondition: port must be > 0 and <= MAXUINT16.: (port > 0) and (port <= MAXUINT16): "port: %s" % str(port) Precondition: numberOfFilesShared must be >= 0 and <= MAXUINT32.: (numberOfFilesShared >= 0) and (numberOfFilesShared <= MAXUINT32): "numberOfFilesShared: %s" % str(numberOfFilesShared) Precondition: kbShared must be >- 0 and <= MAXUINT32: (kbShared >= 0) and (kbShared <= MAXUINT32): "kbShared: %s" % str(kbShared) (inherited from GnutellaTalker )
| |
setInitiator(self)
(inherited from GnutellaTalker )
| |
Sets the line-mode of this receiver. (inherited from LineReceiver )
| |
Sets the raw mode of this receiver. (inherited from LineReceiver )
| |
_abortConnection(self,
logmsg)
(inherited from GnutellaTalker )
| |
_nextDescriptorId(self)
(inherited from GnutellaTalker )
|
Method Details |
---|
pingReceived(self, descriptorId, ttl, hops)Override this to handle ping messages. Precondition: descriptorId must be a string of length DESCRIPTORLENGTH.: (type(descriptorId) is types.StringType) and (len(descriptorId) == DESCRIPTORLENGTH): "descriptorId: %s :: %s" % (repr(descriptorId), str(type(descriptorId)),)
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 1.1 on Thu May 8 13:18:37 2003 | http://epydoc.sf.net |