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:
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user