WIP: Worked on new server thread class that would create and store multiple THREADS of connections. Researched Authorative server structures.

Fixed the current structure of the server to work with the old StreamReciever style and hook up to the Stream Parser

tags: #story[1047] pair[wmu16, mra106]
This commit is contained in:
William Muir
2017-07-14 17:09:33 +12:00
parent 5b908ec355
commit 77e7db79cc
8 changed files with 244 additions and 161 deletions
@@ -2,13 +2,13 @@ package seng302.controllers;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.control.TextField;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane;
import seng302.gameServer.GameServerThread;
import seng302.gameServer.GameState;
import seng302.gameServerWithThreading.MainServerThread;
import seng302.models.stream.StreamReceiver;
import java.io.IOException;
@@ -61,12 +61,10 @@ public class StartScreenController {
try {
String ipAddress = InetAddress.getLocalHost().getHostAddress();
new GameState(ipAddress);
GameServerThread gameServerThread = new GameServerThread("Game Server");
System.out.println("Server thread started");
new MainServerThread().start();
// get the lobby controller so that we can pass the game server thread to it
LobbyController lobbyController = (LobbyController) setContentPane("/views/LobbyView.fxml");
lobbyController.setGameServerThread(gameServerThread);
setContentPane("/views/LobbyView.fxml");
} catch (UnknownHostException e) {
System.err.println("COULD NOT FIND YOUR IP ADDRESS!");