Skip to content

Commit

Permalink
No longer rely on the default OS charset to read the client data
Browse files Browse the repository at this point in the history
  • Loading branch information
ebourg committed Apr 6, 2005
1 parent dd5b6ae commit 1a3e079
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/java/net/jetrix/listeners/TSpecListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public String getName()
public Client getClient(Socket socket) throws Exception
{
TetrinetProtocol protocol = (TetrinetProtocol) ProtocolManager.getInstance().getProtocol(TetrinetProtocol.class);
String init = protocol.readLine(new InputStreamReader(socket.getInputStream()));
String init = protocol.readLine(new InputStreamReader(socket.getInputStream(), net.jetrix.config.ServerConfig.ENCODING));

String dec = TetrinetProtocol.decode(init);

Expand Down
2 changes: 1 addition & 1 deletion src/java/net/jetrix/listeners/TetrinetListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public Client getClient(Socket socket) throws Exception
{
// read the first line sent by the client
TetrinetProtocol protocol1 = (TetrinetProtocol) protocolManager.getProtocol(TetrinetProtocol.class);
String init = protocol1.readLine(new InputStreamReader(socket.getInputStream()));
String init = protocol1.readLine(new InputStreamReader(socket.getInputStream(), net.jetrix.config.ServerConfig.ENCODING));

// test if the client is using the query protocol
Protocol protocol = protocolManager.getProtocol(QueryProtocol.class);
Expand Down

0 comments on commit 1a3e079

Please sign in to comment.