Disconnected Event
Fired when a MQTTSN connection is closed.
Syntax
ANSI (Cross Platform) virtual int FireDisconnected(MQTTSNDisconnectedEventParams *e);
typedef struct {
int StatusCode;
const char *Description; int reserved; } MQTTSNDisconnectedEventParams; Unicode (Windows) virtual INT FireDisconnected(MQTTSNDisconnectedEventParams *e);
typedef struct {
INT StatusCode;
LPCWSTR Description; INT reserved; } MQTTSNDisconnectedEventParams;
- (void)onDisconnected:(int)statusCode :(NSString*)description;
#define EID_MQTTSN_DISCONNECTED 2 virtual INT IPWORKSIOT_CALL FireDisconnected(INT &iStatusCode, LPSTR &lpszDescription);
Remarks
If the connection is broken normally, StatusCode is 0 and Description is "OK".
Refer to the Connected property for more information about MQTT-specific behavior.