@Override
	public void run() {
		getNetworkHandler().fireNetworkEvent(new NetworkEvent(NetworkEvents.START_CLIENT, "Starting client..."));
		setClient(true);
		setServer(false);

		echoSocket = setUpConnection(port, hostname);

		// return if connection went to hell or w/e
		if (echoSocket == null)
			return;
		getNetworkHandler().getController().getUser().setActivePort(echoSocket.getLocalPort());

		try {
			initConnection();
			// initPrintStreamConnection();
		} catch (SocketException e) {
			getNetworkHandler().fireNetworkEvent(new NetworkEvent(NetworkEvents.DISCONNECT));
			return;
		} catch (IOException e) {
			getNetworkHandler().fireNetworkEvent(new NetworkEvent(NetworkEvents.DISCONNECT, "Error reading socket!"));
		} finally {
			getNetworkHandler().fireNetworkEvent(new NetworkEvent(NetworkEvents.SHUTDOWN_CLIENT, "Client shutting down!"));
			kill();
		}
	}