Class ServerSocketHandler

java.lang.Object
it.polimi.ingsw.am13.network.socket.ServerSocketHandler

public class ServerSocketHandler extends Object
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 Details

    • socket_port

      private final int socket_port
      The socket port of the server
    • serverSocket

      private ServerSocket 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

      public void start() throws IOException
      Initialise and start the threat that listens for new connection requests
      Throws:
      IOException - if an I/ O error occurs when opening the socket