Class NetworkConfig
java.lang.Object
it.polimi.ingsw.gc14.Network.NetworkConfig
Shared network constants used by both server and client components.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPort on which the TCP heartbeat server listens.static final longMilliseconds between keep-alive pings sent by the client.static final intMaximum number of players allowed in a game.static final intMinimum number of players required to start a game.static final intPort on which the RMI registry listens.static final longMilliseconds of silence before a client is considered disconnected.static final intPort on which the TCP game server listens. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
RMI_PORT
public static final int RMI_PORTPort on which the RMI registry listens.- See Also:
-
TCP_PORT
public static final int TCP_PORTPort on which the TCP game server listens.- See Also:
-
HEARTBEAT_PORT
public static final int HEARTBEAT_PORTPort on which the TCP heartbeat server listens.- See Also:
-
SILENCE_THRESHOLD_MS
public static final long SILENCE_THRESHOLD_MSMilliseconds of silence before a client is considered disconnected.- See Also:
-
KEEPALIVE_INTERVAL_MS
public static final long KEEPALIVE_INTERVAL_MSMilliseconds between keep-alive pings sent by the client.- See Also:
-
MIN_PLAYERS
public static final int MIN_PLAYERSMinimum number of players required to start a game.- See Also:
-
MAX_PLAYERS
public static final int MAX_PLAYERSMaximum number of players allowed in a game.- See Also:
-
-
Constructor Details
-
NetworkConfig
private NetworkConfig()
-