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