Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while (isServerRunning) {
- // Vytvoreni client socketu
- Socket clientSocket = null;
- System.out.println("Cekam na klienta.");
- try {
- clientSocket = serverSocket.accept(); // ceka na klienta
- newHandler.add(new RobotHandler(clientSocket));
- } catch (IOException e) {
- System.err.println("Spojeni odmitnuto!");
- System.exit(1);
- }
- newHandler.get(countOfHandlers++).run(); // spusti obsluhovatele
- }
Add Comment
Please, Sign In to add comment