Added scheduled match list broadcast to MatchBrowser

- Changed MatchTable to map ClientAddress to HostGame
- Send match list as HostedGamesRequest to multicast address (239.0.0.1:4941)

#story[1188]
This commit is contained in:
cbt24
2017-08-31 17:34:02 +12:00
parent d1c0797db7
commit 2f8daf757a
4 changed files with 58 additions and 46 deletions
@@ -22,8 +22,8 @@ public class MatchTableTest {
public void testTable() {
HostGame entry = new HostGame("127.0.0.1", 4942, (byte)1, (byte)1, RaceStatusEnum.PRESTART, (byte)6, (byte)1);
testTable.addEntry("127.0.0.1", 3779, entry);
testTable.addEntry(new ClientAddress("127.0.0.1", 3779), entry);
assertEquals(testTable.getMatchTable().get(new TableKey("127.0.0.1", 4942)), Arrays.asList(1, 1, 2, 6, 1));
assertEquals(testTable.getMatchTable().get(new ClientAddress("127.0.0.1", 4942)), entry);
}
}