Class GameServer
java.lang.Object
it.polimi.ingsw.communication.tcp_server.TcpServer
it.polimi.ingsw.communication.sugar_framework.SugarServer
it.polimi.ingsw.server.server_logic.GameServer
- All Implemented Interfaces:
Runnable
-
Field Summary
FieldsFields inherited from class it.polimi.ingsw.communication.sugar_framework.SugarServer
hallId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidonPeerConnect(Peer peer) The server calls this function any time a peer connects to the serverprotected voidonPeerDisconnect(Peer peer) The server calls this function any time a peer disconnects from the serverprotected voidonPeerMessage(Peer peer, SugarMessage message) The server calls this function any time it receives a message from a peer.Methods inherited from class it.polimi.ingsw.communication.sugar_framework.SugarServer
beforeStart, createRoom, createRoom, deleteRoom, disconnectPeer, getRoom, multicastToRoom, onConnect, onDisconnect, onMessage, sendMethods inherited from class it.polimi.ingsw.communication.tcp_server.TcpServer
disconnectClient, log, run, send, setLogHeader, setLogStream
-
Field Details
-
authController
-
enableReconstructGames
private final boolean enableReconstructGames- See Also:
-
-
Constructor Details
-
GameServer
- Throws:
IOException
-
-
Method Details
-
onPeerConnect
Description copied from class:SugarServerThe server calls this function any time a peer connects to the server- Specified by:
onPeerConnectin classSugarServer- Parameters:
peer- the peer that has connected
-
onPeerDisconnect
Description copied from class:SugarServerThe server calls this function any time a peer disconnects from the server- Specified by:
onPeerDisconnectin classSugarServer- Parameters:
peer- the peer that disconnected from the server
-
onPeerMessage
Description copied from class:SugarServerThe server calls this function any time it receives a message from a peer.- Specified by:
onPeerMessagein classSugarServer- Parameters:
peer- the peer who sent the messagemessage- the message received from the peer
-