updating match table to store ip and port of clients and hosts
#story[1188]
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user