Hi,
My question is, how can I find the MQTT packet size which include the control header, packet length, variable length header and payload .
At the moment i am using getsizeof to find the size of payload.
size_payload = sys.getsizeof(msg.payload)
My payload is in the form : b'{"0":294.3875741324,"1":292.1924140501}'
Size i get for this payload with getsizeof() is 72.
Now i need to find the size of the complete packet.
when i use the same getsizeof() for the message
size_payload = sys.getsizeof(msg)
I get size as 112.
Could someone please confirm this method.
Appreciate if someone could suggest any other method as well.
Thanks in advance.
--
To learn more about MQTT see https://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/3cd7f504-8038-486c-a41e-2d833c60c7fcn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/81d9fd4f-7691-482f-b3e9-02516f3e98b0n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/304d8353-e3dc-4b15-a699-ca91bd5f151cn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/32044aaf-416d-47d5-b088-e7cc4592c3a1n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/a79e019c-5c6e-46a6-92da-1b80cbe99b66n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/F097982F-6109-46F0-BD38-F3B51C2A8497%40stanford-Clark.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/CAChL5Nc2en2d6gSU5TJCrhFQV1k905%2BExj%3D3FKpzoFcfgK3dTA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/7D422522-E772-4345-836A-95B7E2A12480%40stanford-Clark.com.