package Prog3.src.DiningPhilosophers; | |||||
import static org.junit.jupiter.api.Assertions.*; | |||||
class ForkTest { | |||||
} |
try (Socket socket = new Socket("localhost", 12345)) { | try (Socket socket = new Socket("localhost", 12345)) { | ||||
sendLine(socket, line); | sendLine(socket, line); | ||||
receiveLine(socket); | |||||
return receiveLine(socket); | |||||
} catch (Exception e) { | } catch (Exception e) { | ||||
return "Error connecting to the server."; | return "Error connecting to the server."; | ||||
} | } | ||||
return line; | |||||
} | } | ||||
} | } |