public boolean sendData(Object data) {
        if (output == null || !clientSocket.isConnected()) {
            return false;
        }

        synchronized (this) {
            try {
                output.flush();
                output.writeObject(data);
                output.flush();
                output.reset();

                if (data.getClass().equals(String.class)) {
                    if (data.equals("goodbye")) {
                        clientSocket.close();
                        if (serverSocket != null) {
                            serverSocket.close();
                        }

                        keepRunning = false;
                    }
                }
            } catch (IOException e) {
                EIError.debugMsg("Network IO Error - Sending");
            }

            return true;
        }
    }