(self, payload)
return self.default_payload_class(payload)
DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.
DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.
DEV : Guesses the next payload class from layer bonds . Can be overloaded to use a different mechanism .
def guess_payload_class(self, payload):
        """DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism."""
        for t in self.aliastypes:
            for fval, cls in t.payload_guess:
                ok = 1
                for k in fval.keys():
                    if not hasattr(self, k) or fval[k] != self.getfieldval(k):
                        ok = 0
                        break
                if ok:
                    return cls
        return self.default_payload_class(payload)
def guess_payload_class ( self , payload ) : for t in self . aliastypes : for fval , cls in t . payload_guess : ok = 1 for k in fval . keys ( ) : if not hasattr ( self , k ) or fval [ k ] != self . getfieldval ( k ) : ok = 0 break if ok : return cls return self . default_payload_class ( payload )