Sign In Register

How can we help you today?

Start a new topic

How many RT sessions are online?

Hi, 


Recently I tried logging a message in RTSession.onSessionShutdown() callback.


If I join a match and shut both clients after a while, I noticed that the message is never logged. 


That made me curious. What if all the RTSessions I opened while testing are still alive? Is there a way I can know the number of active match instances? That sounds like a pretty important information to me.


System.matchInstance collection seems to contain all the matches whether it's live or already completed.


1 person has this question


RTSession.onSessionShutdown(function(){
    RTSession.getLogger().info("on session shutdown.");    
})

RTSession.onPlayerDisconnect(function(player){
    RTSession.getLogger().info("on player disconnected");
})


Both of these callbacks doesn't work for me. The clients receive OnPlayerDisconnect callbacks from GameSparksRTUnity when a peer disconnects. But on the server side, onPlayerDisconnect & onSessionShutdown doesn't seem to work. Any ideas?

Hi Ali, 


By using drop in/ drop out functionality with your Real time matches, this can be determined via the pending match collection. By using the nosql explorer to acquire a count of entries. When players disconnect entries expire and will no longer be present inside of this collection. 


As regard player disconnect, have you correctly configured your player disconnect delay value in your match configuration? 


Best Regards, Patrick. 

Login to post a comment