Merge remote-tracking branch 'origin/master' into boat_movement_smooth
This commit is contained in:
@@ -67,7 +67,9 @@ public class NetworkInterface {
|
|||||||
HostedGamesRequestEncoder encoder = new HostedGamesRequestEncoder();
|
HostedGamesRequestEncoder encoder = new HostedGamesRequestEncoder();
|
||||||
try {
|
try {
|
||||||
byte[] message = encoder.encode(new HostGamesRequest(games));
|
byte[] message = encoder.encode(new HostGamesRequest(games));
|
||||||
|
System.out.println(LocalDateTime.now() + ": Sending " + games.size() + " game/s");
|
||||||
for(ClientAddress address: clientsAddresses) {
|
for(ClientAddress address: clientsAddresses) {
|
||||||
|
System.out.println("Sending to " + address.getIp());
|
||||||
serverSocket.send(new DatagramPacket(message, message.length, InetAddress.getByName(address.getIp()), 4941));
|
serverSocket.send(new DatagramPacket(message, message.length, InetAddress.getByName(address.getIp()), 4941));
|
||||||
}
|
}
|
||||||
} catch (InvalidMessageException | IOException e) {
|
} catch (InvalidMessageException | IOException e) {
|
||||||
@@ -85,6 +87,7 @@ public class NetworkInterface {
|
|||||||
scheduler.scheduleAtFixedRate(new TimerTask() {
|
scheduler.scheduleAtFixedRate(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
System.out.println("flush");
|
||||||
matchTable.getMatchTable().clear();
|
matchTable.getMatchTable().clear();
|
||||||
}
|
}
|
||||||
}, period, period);
|
}, period, period);
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ public class MatchBrowserInterface {
|
|||||||
|
|
||||||
public MatchBrowserInterface() {
|
public MatchBrowserInterface() {
|
||||||
try {//132.181.16.13 is the ip of the CI as of 13/9/17
|
try {//132.181.16.13 is the ip of the CI as of 13/9/17
|
||||||
this.IPAddress = InetAddress.getByName("132.181.16.13"); //InetAddress.getLocalHost();
|
this.IPAddress = InetAddress.getByName("umbrasheep.com"); //InetAddress.getLocalHost();
|
||||||
|
this.IPAddress = InetAddress.getByName("191.101.233.116"); //InetAddress.getLocalHost();
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user