I have a custom MQTT broker that can reject connection attempts and return specific codes depending on the situation (unknown users, invalid credentials etc). With the Android MQTT library, LastException shows the reason for the rejected connection.
(MqttSecurityException) Not authorized to connect (5)
The iMQTT library shows this for a failed connection attempt when I examine LastException:
<B4IExceptionWrapper: (null)>
I can inspect the mqttClient instance in the B4i code with the debugger and I can see a _lastErrorCode field:
How can I retrieve this information programmatically in B4i?
V