[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] Fw:Anyway to get the detail connection error from paho-mqtt-client0.40
|
Hi,
if using IMqttAsyncClient
IMqttToken connect(MqttConnectOptions options, Object userContext, IMqttActionListener callback)
You can set a IMqttActionListener, and you will be notified if connect failed, and get the reason code and cause from MqttException.
if using IMqttClient
IMqttToken connectWithResult(MqttConnectOptions options), check IMqttToken.getException()
Best Regards,
Bin Zhang(张斌)
--------------------------------------------------------------------------------------------
WebSphere MQ, IBM China Software Development Lab
Notes: Bin BJ Zhang/China/IBM
E-Mail: zhbinbj@xxxxxxxxxx
Address: Ring Building 3F, ZhongGuanCun Software Park,
DongBeiWang West Road No.8, Haidian District, Beijing, 100193, China
-------------------------------------------------------------------------------------------
wisper ---10/22/2014 10:24:37 AM---Hi all:
From: wisper <tph85666031@xxxxxxx>
To: paho-dev@xxxxxxxxxxx
Date: 10/22/2014 10:24 AM
Subject: [paho-dev] Fw:Anyway to get the detail connection error from paho-mqtt-client0.40
Sent by: paho-dev-bounces@xxxxxxxxxxx
Hi all:
Someone said that this mail has already been replyed, but I didn’t get it.
Could you please resend this to me? Thanks very much!
-------- Forwarding messages --------
From: wisper <tph85666031@xxxxxxx>
Date: 2014-10-14 17:34:57
To: paho-dev@xxxxxxxxxxx
Subject: Anyway to get the detail connection error from paho-mqtt-client0.40
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