hsaturn / TinyMqtt

ESP 8266 / 32 / WROOM Small footprint Mqtt Broker and Client
GNU General Public License v3.0
183 stars 40 forks source link

refactoring: MqttBroker, "broker" -> "mqtt_client" #37

Closed dg6nee closed 1 year ago

dg6nee commented 1 year ago

refactoring: MqttBroker contains a member variable with the name "broker". This is quite misleading and makes the code harder to understand, as this member is a mqtt client -> renaming from "broker" to "mqtt_client"

hsaturn commented 1 year ago

refactoring: MqttBroker contains a member variable with the name "broker". This is quite misleading and makes the code harder to understand, as this member is a mqtt client -> renaming from "broker" to "mqtt_client"

MqttClient is used because it has almost all what is necessary for a MqttBroker to connect with a remote Broker. When a broker links to another one, it must act as if it was a usual MqttClient. There is no link between brokers in Mqtt specification. And the zeroconf future feature wants this kind of link.

alranel commented 1 year ago

I vote for naming it remote_broker instead of broker :) (Just the member variable; no need to rename the client class IMHO)

hsaturn commented 1 year ago

broker renamed to remote_broker