Mesibo Connection Monitoring

You can monitor if your app is connected with the mesibo real-time server (cloud or your on-premise) by implementing Mesibo_onConnectionStatus in the connection listener. The connection listener is invoked when the connection status is changed. It is also invoked when the token is about to expire.

void Mesibo_onConnectionStatus(int status) {


}

The following are the status values:

ParameterDescriptionValue
MESIBO_STATUS_ONLINEThe user is connected and online1
MESIBO_STATUS_OFFLINEThe user is offline2
MESIBO_STATUS_SIGNOUTThe user has signed out. The most likely reason is that the user has logged in from another device. You can use multi-device login feature if the user is required to log in from multiple devices simultaneously.3
MESIBO_STATUS_AUTHFAILToken is wrong or expired. For Javascript, C++, and Python, it also happens if you have passed the wrong app id in setAppName()4
MESIBO_STATUS_STOPPEDThe user is offline and stopped. Automatic reconnection will not be attempted5
MESIBO_STATUS_CONNECTINGThe user is connecting but not online yet6
MESIBO_STATUS_CONNECTFAILUREConnection Failed7
MESIBO_STATUS_NONETWORKMesibo API could not detect network connection on your device8
MESIBO_STATUS_ONPREMISEERRORYou have configured the on-premise server but it is not running or the firewall is preventing your apps from connecting to the on-premise server9