Added functionality for more than one visualiser to connect to the mock.

- more than one visualiser can now connect to the mock.
- Created class ConnectionAcceptor that will accept and allocate to each socket
- Issue of sockets connecting after the race starts then disconnecting will use a socket slot.
#story[1010]
This commit is contained in:
Fan-Wu Yang
2017-07-24 17:27:49 +12:00
parent 86851c6181
commit 9f99e21232
9 changed files with 233 additions and 129 deletions
@@ -33,6 +33,10 @@ public class RaceConnection {
try (Socket s = new Socket()){
s.connect(i, 750);//TODO this should be at least a second or two, once moved to its own thread
status.set("Ready");
s.shutdownInput();
s.shutdownOutput();
s.close();
System.out.println(String.valueOf(s.isClosed()));
return true;
} catch (IOException e) {}