java.lang.Object
it.polimi.ingsw.am13.network.socket.ServerSocketHandler
This class listens for new socket connection requests coming from the client.
Whenever a new connection is accepted, it starts a new
ClientRequestsHandler
thread-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ServerSocket
The server socket of this serverprivate final int
The socket port of the server -
Constructor Summary
ConstructorsConstructorDescriptionServerSocketHandler
(int socket_port) Assign the value to the socket port attribute -
Method Summary
Modifier and TypeMethodDescriptionvoid
start()
Initialise and start the threat that listens for new connection requests
-
Field Details
-
socket_port
private final int socket_portThe socket port of the server -
serverSocket
The server socket of this server
-
-
Constructor Details
-
ServerSocketHandler
public ServerSocketHandler(int socket_port) Assign the value to the socket port attribute- Parameters:
socket_port
- the socket port of the server
-
-
Method Details
-
start
Initialise and start the threat that listens for new connection requests- Throws:
IOException
- if an I/ O error occurs when opening the socket
-