python-flashmedia icon indicating copy to clipboard operation
python-flashmedia copied to clipboard

AMFMessage size

Open nxkbd opened this issue 9 years ago • 0 comments

class AMFMessage(Packet):
    @property
    def size(self):
        size = 4
        size += AMF0String.size(self.target_uri)
        size += AMF0String.size(self.response_uri)
        size += AMF0Value.size(self.value)

        return size

Why size is set that way? And what is 4? According to AMF specification length - property of message body without target-uri and response-uri: (http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/amf/pdf/amf0-file-format-specification.pdf) "The third field of an AMF message is the byte length of the message body"

nxkbd avatar Dec 24 '16 03:12 nxkbd