Merge branch 'cbt-multi-controller' into css

# Conflicts:
#	racevisionGame/src/main/java/mock/app/App.java
#	racevisionGame/src/main/java/visualiser/Controllers/ConnectionController.java
#	racevisionGame/src/main/java/visualiser/app/App.java
#	racevisionGame/src/main/java/visualiser/model/RaceConnection.java
#	racevisionGame/src/main/resources/visualiser/scenes/connect.fxml
This commit is contained in:
zwu18
2017-07-26 20:54:07 +12:00
23 changed files with 757 additions and 219 deletions
@@ -17,6 +17,12 @@ public class RaceConnection {
private final StringProperty gamename;
public RaceConnection(String hostname, int port, String gamename) {
/**
* Constructor for remote host connections.
* @param hostname URL for remote host
* @param port port for game feed
*/
public RaceConnection(String hostname, int port) {
this.hostname = new SimpleStringProperty(hostname);
this.port = port;
this.status = new SimpleStringProperty("");
@@ -35,6 +41,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) {
}