Logout
Sometimes, you might want to explicitly log out of your session, e.g. if you want to re-connect as a different user or just to be sure that nobody can abuse your device while you leave it alone for some time.
Implementing logout functionality means you need to close current communication channels and re-establish new connections with a new authentication. In Digitanium all this is triggered by just sending a RestartEvent.
IMPORTANT: When calling RestartEvent the developer has to wait for RestartResultEvent before proceeding with using any MC features. Using the SDK before initialization (StartEvent) has completed will lead to errors - same applies for re-initialization (RestartEvent).