Added garbage collection for disconnected players

- Heartbeat messages are sent out from their own thread to each player
- If a heartbeat message can't be sent to a player, they are removed from the list of players
- Added equals method for players
Tags: #story[1047]
This commit is contained in:
Michael Rausch
2017-07-13 22:07:03 +12:00
parent 1e6fd1af09
commit c19f66a6a4
6 changed files with 141 additions and 56 deletions
@@ -3,5 +3,15 @@ package seng302.gameServer;
import seng302.models.Player;
public interface ClientConnectionDelegate {
/**
* A player has connected to the server
* @param player The player that has connected
*/
void clientConnected(Player player);
/**
* A player has disconnected from the server
* @param player The player that has disconnected
*/
void clientDisconnected(Player player);
}