I'm trying to make a one-shot mqtt function. The process is below
- connect
- publish
- disconnect
Then I coded like below. I show only the core code.
Do I have to execute fds_init in send_one_shot_mqtt_msg everytime it publish a message on MQTT?
Should I omit fds_init?
I really don't understand what fds_init does.
I would appreciate it if you help me.