|
RuneHive-Game
|
Represents a Session when a Player has been authenticated and active in the game world.
More...
Public Member Functions | |
| Player | getPlayer () |
| void | handleClientPacket (Object o) |
| The method that is called when the client sends packets to the server. | |
| void | processClientPackets () |
| void | processServerPacketQueue () |
| void | queueServerPacket (GamePacket packet) |
| Public Member Functions inherited from com.runehive.net.session.Session | |
| final void | close () |
| The method to close this session. | |
| Channel | getChannel () |
Gets the underlying Channel for this Session. | |
| String | getHost () |
| Gets the users host address. | |
| Session (Channel channel) | |
Creates a new Session. | |
Protected Member Functions | |
| void | onClose (ChannelFuture f) |
| The method called after a session has been closed. | |
Package Functions | |
| GameSession (Channel channel, Player player) | |
Private Member Functions | |
| void | queueClientPacket (final GamePacket packet) |
Private Attributes | |
| final MessagePassingQueue< GamePacket > | incomingPackets = new MpscArrayQueue<>(Config.CLIENT_PACKET_THRESHOLD) |
| final MessagePassingQueue< GamePacket > | outgoingPackets = new MpscArrayQueue<>(Config.SERVER_PACKET_THRESHOLD) |
| final Player | player |
Static Private Attributes | |
| static final Logger | logger = LogManager.getLogger(GameSession.class) |
Additional Inherited Members | |
| Protected Attributes inherited from com.runehive.net.session.Session | |
| final Channel | channel |
| The channel attached to this session. | |
| final String | host |
| The users host address. | |
Represents a Session when a Player has been authenticated and active in the game world.
Definition at line 21 of file GameSession.java.
|
package |
Definition at line 33 of file GameSession.java.
References com.runehive.net.session.Session.channel, and player.
| Player com.runehive.net.session.GameSession.getPlayer | ( | ) |
| void com.runehive.net.session.GameSession.handleClientPacket | ( | Object | o | ) |
The method that is called when the client sends packets to the server.
| o | The vague object packet. |
Reimplemented from com.runehive.net.session.Session.
Definition at line 39 of file GameSession.java.
References queueClientPacket().
|
protected |
The method called after a session has been closed.
| future | The result of the session being closed. |
Reimplemented from com.runehive.net.session.Session.
Definition at line 46 of file GameSession.java.
References player, and com.runehive.game.world.World.queueLogout().
| void com.runehive.net.session.GameSession.processClientPackets | ( | ) |
Definition at line 54 of file GameSession.java.
References com.runehive.Config.CLIENT_PACKET_THRESHOLD, incomingPackets, logger, player, and com.runehive.net.packet.PacketRepository.sendToListener().
Referenced by com.runehive.game.engine.sync.task.PlayerPreUpdateTask.run().
| void com.runehive.net.session.GameSession.processServerPacketQueue | ( | ) |
Definition at line 76 of file GameSession.java.
References com.runehive.net.session.Session.channel, logger, outgoingPackets, player, and com.runehive.Config.SERVER_PACKET_THRESHOLD.
Referenced by com.runehive.game.engine.sync.task.PlayerPostUpdateTask.run().
|
private |
Definition at line 50 of file GameSession.java.
References incomingPackets.
Referenced by handleClientPacket().
| void com.runehive.net.session.GameSession.queueServerPacket | ( | GamePacket | packet | ) |
Definition at line 72 of file GameSession.java.
References outgoingPackets.
|
private |
Definition at line 27 of file GameSession.java.
Referenced by processClientPackets(), and queueClientPacket().
|
staticprivate |
Definition at line 23 of file GameSession.java.
Referenced by processClientPackets(), and processServerPacketQueue().
|
private |
Definition at line 30 of file GameSession.java.
Referenced by processServerPacketQueue(), and queueServerPacket().
|
private |
Definition at line 25 of file GameSession.java.
Referenced by GameSession(), getPlayer(), onClose(), processClientPackets(), and processServerPacketQueue().