All pastes #795966 Raw Edit

Anonymous

public text v1 · immutable
#795966 ·published 2007-11-24 17:04 UTC
rendered paste body
/**
	 * 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("");
		}
	}