wheneverUserDisconnects static method
Provide a method that gets executed whenever a user loses connection to the server.
Implementation
static void wheneverUserDisconnects(
OnSessionDisconnected onSessionDisconnected) {
globalSessionInstance.functionsToBeExecutedOnDisconnect
.add(onSessionDisconnected);
}