public void run() {
		while (ok != -1) {
			try {
				runs = true;
				lm.waitForEvent();
				if (conn.isClosed()) {
					ok = -1;
				}
			} catch (InterruptedException e) {
				interrupt();
				ok = -1;
			}
			try {
				if (ok != -1) {
					readAndPrintMsg();
					getAndPrintConnected();
					ok = writeGameName();
					os.flush();
				}
			} catch (IOException e) {
				// e.printStackTrace();
				ok = -1;
			}
			if (this.isInterrupted()) {
				return; // keep socket
			}
		}
		runs = false;
		lm.deRegister(this);
		return;
	}