Package Tribler :: Package Core :: Module RequestPolicy :: Class AbstractRequestPolicy

Class AbstractRequestPolicy

Known Subclasses:

Superclass for all Tribler RequestPolicies. A RequestPolicy controls the authorization of messages received via the Tribler Overlay, such as distributed recommendations, remote queries, etc.
Instance Methods
 
__init__(self)
Constructor
 
allowed(self, permid, messageID)
Returns whether or not the peer identified by permid is allowed to send us a message of type messageID.
Method Details

allowed(self, permid, messageID)

 
Returns whether or not the peer identified by permid is allowed to send us a message of type messageID.
Parameters:
  • permid - The permid of the sending peer.
  • messageID - A integer messageID, see Tribler.Core.BitTornado.BT1.MessageID
Returns:
A boolean indicating whether the message is authorized.