Package io.sockit.gameserver
Interface SessionListener
public interface SessionListener
Interface for Session event callbacks
-
Method Summary
Modifier and Type Method Description void
onLoggedIn(Session session, boolean firstTime)
Event-Handler/Callback called when user loginsvoid
onLoggedOff(Session session)
Event-Handler/Callback called when user logffsvoid
onMesg(Session session, String command, byte[] data)
Event-Handler/Callback called when server receives a custom binary message from the clientvoid
onMesg(Session session, String command, String data)
Event-Handler/Callback called when server receives a custom text message from the clientvoid
onMesg(Session session, String command, JsonObject dataAsJson)
Event-Handler/Callback called when server receives a custom json message from the clientvoid
onSessionTimedOut(Session session)
Event-Handler/Callback called when session times outvoid
onShutDown(Session session)
Event-Handler/Callback called when server begins shuts down but before shutdown message is sent to client
-
Method Details
-
onLoggedIn
Event-Handler/Callback called when user logins- Parameters:
session
- - the user's sessionfirstTime
- - whether its the first time that the user has logged in
-
onLoggedOff
Event-Handler/Callback called when user logffs- Parameters:
session
- - the user's session
-
onSessionTimedOut
Event-Handler/Callback called when session times out- Parameters:
session
- - the user's session
-
onShutDown
Event-Handler/Callback called when server begins shuts down but before shutdown message is sent to client- Parameters:
session
- - the user's session
-
onMesg
Event-Handler/Callback called when server receives a custom json message from the client- Parameters:
session
- - the user's sessioncommand
- - the message commanddataAsJson
- - the message data
-
onMesg
Event-Handler/Callback called when server receives a custom text message from the client- Parameters:
session
- - the user's sessioncommand
- - the message commanddata
- - the message data
-
onMesg
Event-Handler/Callback called when server receives a custom binary message from the client- Parameters:
session
- - the user's sessioncommand
- - the message commanddata
- - the message data
-