Mesibo Connection Monitoring

Estimated reading time: 1 minute

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:

Parameter Description Value
MESIBO_STATUS_ONLINE The user is connected and online 1
MESIBO_STATUS_OFFLINE The user is offline 2
MESIBO_STATUS_SIGNOUT The 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_AUTHFAIL Token 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_STOPPED The user is offline and stopped. Automatic reconnection will not be attempted 5
MESIBO_STATUS_CONNECTING The user is connecting but not online yet 6
MESIBO_STATUS_NONETWORK Mesibo API could not detect network connection on your device 8
MESIBO_STATUS_ONPREMISEERROR You have configured the on-premise server but it is not running or the firewall is preventing your apps from connecting to the on-premise server 9
networking connection, monitoring