/** * Constructor for the HSClient. Initializes the HSClient properties. * * @param server * The server to which this client is connected. * @param socket * The socket through which this client has connected. */ public HSClient(HeroServer server, Socket socket) { this.server = server; this.socket = socket; this.ip = socket.getInetAddress().getHostAddress(); // --- init the reader and writer try { in = new BufferedReader(new InputStreamReader(socket .getInputStream())); out = new PrintWriter(socket.getOutputStream(), true); } catch (IOException ioe) { // server.writeActivity("Client IP: " + ip + " could not be " // + "initialized and has been disconnected."); killClient(""); } }