Uses of Class
io.sockit.gameserver.Session
Package | Description |
---|---|
io.sockit.gameserver |
This is the core package for the Sockit Multiplayer Game (Server) Engine and provides the classes necessary to implement the server side of a multiplayer turn based game.
|
-
Uses of Session in io.sockit.gameserver
Fields in io.sockit.gameserver declared as Session Modifier and Type Field Description Session
Player. session
The client session of the player.Methods in io.sockit.gameserver that return types with arguments of type Session Modifier and Type Method Description Iterable<Session>
Room. getSpectators()
returns all the client session who are spectatorsMethods in io.sockit.gameserver with parameters of type Session Modifier and Type Method Description protected boolean
Room. canSeatBeTaken(Session session, int seatNo, JsonObject data)
Callback called when a session takes seat to check whether session should be allowed to take seat or not.void
Room. debug(Session session, String txt)
Logs debug messages along with the user name when debug is enabledboolean
Room. isSeated(Session session)
Returns whether the specified client session is seated or notboolean
Room. isSpectator(Session session)
returns whether specified client session is a spectator or not.void
Room. leave(Session session)
Evicts the specified client session from the room.void
Room. leaveSeat(Session session)
Evicts the specified client session from his/her seatprotected abstract Player
Room. newPlayer(Session session, int SeatNo, JsonObject data)
Factory method called to instantiate a new player.protected abstract void
Game. onEnterGame(Session session, boolean firstTime)
Event-Handler/Callback - called when a client session enters the Game (i.e.protected abstract void
Game. onExitGame(Session session)
Event-Handler/Callback - called when a client session exits the Game (i.e.void
SessionListener. onLoggedIn(Session session, boolean firstTime)
Event-Handler/Callback called when user loginsvoid
SessionListener. onLoggedOff(Session session)
Event-Handler/Callback called when user logffsvoid
SessionListener. onMesg(Session session, String command, byte[] data)
Event-Handler/Callback called when server receives a custom binary message from the clientvoid
SessionListener. onMesg(Session session, String command, String data)
Event-Handler/Callback called when server receives a custom text message from the clientvoid
SessionListener. onMesg(Session session, String command, JsonObject dataAsJson)
Event-Handler/Callback called when server receives a custom json message from the clientprotected void
Room. onRoomJoined(Session session)
Event-Handler/Callback called after session is added to room but before joinedRoom message is sent to the client.protected void
Room. onRoomLeft(Session session, boolean isLoggingOut)
Event-Handler/Callback called after room Left but before room Left message is sent to playervoid
SessionListener. onSessionTimedOut(Session session)
Event-Handler/Callback called when session times outvoid
SessionListener. onShutDown(Session session)
Event-Handler/Callback called when server begins shuts down but before shutdown message is sent to clientvoid
Room. sendJsonMessageToAll(String command, JsonObject data, Session sessionNotToSend)
Sends a Json message to all sessions in the room except the one specified.void
Room. sendJsonMessageToPlayers(String command, JsonObject data, Session sessionNotToSend)
Sends a Json message to all players in the room except the one specified.void
Room. sendJsonMessageToSpectators(String command, JsonObject data, Session sessionNotToSend)
Sends a Json message to all spectators in the room except the one specified.void
Room. sendRoomDataToSession(Session session)
Sends Room Data to the specified sessionvoid
Room. sendTxtMessageToAll(String command, String data, Session sessionNotToSend)
Sends a text message to all sessions in the room except the one specified.void
Room. sendTxtMessageToPlayers(String command, String data, Session sessionNotToSend)
Sends a text message to all players in the room except the one specified.void
Room. sendTxtMessageToSpectators(String command, String data, Session sessionNotToSend)
Sends a text message to all spectators in the room except the one specified.Constructors in io.sockit.gameserver with parameters of type Session Constructor Description Player(Session session, int seatNo)
Creates a Player whose session is the specified session and whose seat number is the specified seat number