Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Anyway to get the detail connection error from paho-mqtt-client0.40

You should definitely upgrade to version 1.0+ of the library as 0.4 is pre-release and not actively maintained.

You should be able to get the information you need from the MqttException object:
http://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/MqttException.html



On Tue, Oct 14, 2014 at 10:34 AM, wisper <tph85666031@xxxxxxx> wrote:

Hi all:

 

Sorry to boring you.

 

For paho-mqtt-client0.4, is there any way to get the detail connection error while doing a mqtt connection like mqttclient.connec()?

Sometimes I need to know if the connection was rejected either y server cause of the incorrect username or password or by the unstable network connection.

BTW, I also wanna if “connecionlost” API can provide the detail lost reason, like “clientid login in other place, connection closed” or something else.


Thanks!

--wisper


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev



--
Andy Piper | Kingston upon Thames, London (UK)
blog: http://andypiper.co.uk   |   skype: andypiperuk
twitter: @andypiper  |  images: http://www.flickr.com/photos/andypiper

Back to the top