esp-mqtt-arduino
                                
                                 esp-mqtt-arduino copied to clipboard
                                
                                    esp-mqtt-arduino copied to clipboard
                            
                            
                            
                        setServer function
Why doesn't exists a setServer function which allow to change the server name dinamically?
I have resolved with dynamic allocation, i hope is the same thing.
Hi all. I'm Roberto. Is it possible to use this library on my esp8266 and esp32??? How can I dinamically set server parameters? Can anyone help me please?
Thank you
hi. i myself used this library only on an esp8266. for esp32 i can not say, but it may compile and run.
if you need to dynamically connect to a server, you would need to create a MQTT object:
MQTT* my_client = new MQTT(client_id, host, port);
hth
Thank I try on esp8266 and it's ok. as soon as possible text on esp32 and I tell you the results.
Roberto