ServerSocket serverSocket = new ServerSocket(port);
Server.logger.debug("Application-Server started on port " + port);
while (true) {
Socket socket = serverSocket.accept();
ClientHandler handler = new ClientHandler(socket);
handler.start();
}
} catch (NumberFormatException e) {
Server.logger.error("Please specify a valid port!");
}
}