Package Tribler :: Package Core :: Module RequestPolicy :: Class AllowAllRequestPolicy

Class AllowAllRequestPolicy

AbstractRequestPolicy --+
                        |
                       AllowAllRequestPolicy

A RequestPolicy that allows all messages to be sent by all peers.
Instance Methods
 
allowed(self, permid, messageID)
Returns whether or not the peer identified by permid is allowed to send us a message of type messageID.
 
allowAllRequestsAllPeers(self, permid, messageID)

Inherited from AbstractRequestPolicy: __init__

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.
Overrides: AbstractRequestPolicy.allowed
(inherited documentation)