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
@@ -21,13 +21,14 @@ public class HostedGamesRequestDecoder implements MessageDecoder{
List<HostGame> knownGames = new ArrayList<>();
int byteIndex = 4;
for (int i = 0; i < numberOfGames; i++){
knownGames.add((HostGame) lineDecoder.decode(Arrays.copyOfRange(encodedMessage, byteIndex, byteIndex+14)));
knownGames.add((HostGame) lineDecoder.decode(Arrays.copyOfRange(encodedMessage, byteIndex, byteIndex+13)));
byteIndex += 13;
}
return new HostGamesRequest(knownGames);
} catch (Exception e) {
e.printStackTrace();
throw new InvalidMessageException("Could not decode Host game message.", e);
}
}