updating match table to store ip and port of clients and hosts

#story[1188]
This commit is contained in:
hba56
2017-08-31 13:45:04 +12:00
parent 960b1213fb
commit 9161f69547
8 changed files with 99 additions and 26 deletions
@@ -17,6 +17,7 @@ import shared.model.Bearing;
import shared.model.Constants;
import java.io.IOException;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.nio.charset.StandardCharsets;
import java.time.ZonedDateTime;
@@ -206,8 +207,8 @@ public class Event {
* @return hostGame Ac35DataType
*/
public HostGame getHostedGameData() throws IOException{
InetAddress ip = InetAddress.getByName("localhost");
return new HostGame(ip.getHostAddress(), 3779,(byte) 1,(byte) 1, RaceStatusEnum.PRESTART, (byte) 1, (byte) 1);
String ip = Inet4Address.getLocalHost().getHostAddress();
return new HostGame(ip, 3779,(byte) 1,(byte) 1, RaceStatusEnum.PRESTART, (byte) 1, (byte) 1);
}
}