logger.info("crating client game for server " + host + ":" + port);
return createClientCommutator(new Socket(host, port));
}
private static StreamCommutator createClientCommutator(Socket client) throws IOException {
StreamCommutator commutator = new StreamCommutator();
commutator.addStreams(client.getOutputStream(), client.getInputStream(), StreamCommutator.REMOTE);
commutator.addStreams(System.out, System.in, StreamCommutator.LOCAL);
return commutator;
}