knolleary / pubsubclient

A client library for the Arduino Ethernet Shield that provides support for MQTT.
http://pubsubclient.knolleary.net/
MIT License
3.82k stars 1.47k forks source link

Cannot find where header is created with payload #955

Closed navalogy closed 2 years ago

navalogy commented 2 years ago

I have been trying to get to know how the buffer is created in PubSubClient.cpp file. I have printed the buffer in the serial monitor and could know the topic and payload. Also after going through the codebase, I could understand little about the previous bytes of the buffer. Also the bits of the buffer which are there while being connected changes after the initial connection which I could not understand why. So can anybody help me out with this?

The data to flow through mqtt must have a header with it's IP addresses. I could not figure out where this type of headers are created in the codebase. Can anybody please tell me where the IP or mac header is created in the codebase?

knolleary commented 2 years ago

This library doesn't deal with the low level network connection. When creating the client, you provide a network Client object that deals with the actual TCP connection.