Added io.Reader and io.Writer wrapper

This finalizes the work on getting the server to support multiple encodings for
players and spectators.
This commit is contained in:
sm
2014-03-13 00:12:21 -07:00
parent e6c7abc969
commit 9a4b76f610
2 changed files with 70 additions and 52 deletions
+2 -2
View File
@@ -275,7 +275,7 @@ encodingLoops:
}
}
p := NewPlayer(player_id, ws, game.bw)
p := NewPlayer(player_id, ws, game.bw, encoding)
log.Printf("%s: made a player: %s", gid.Id, p.Id)
convertedStats := map[string]Stats{}
@@ -330,7 +330,7 @@ encodingLoops:
gid.Id,
)
case "spectator":
s := NewSpectator(player_id, ws, game.bw)
s := NewSpectator(player_id, ws, game.bw, encoding)
log.Printf("%s, %s: about to register this spectator", gid.Id, s.Id)
game.sregister <- s
log.Printf("%s, %s: registered spectator", gid.Id, s.Id)