public void run() {
		this.done = false;
	
		try {			
			if (serverMode) {
				client = new Socket(objectatHost, objectatPort);
				
				StringWriter stringWriter = new StringWriter();
				String eventXML = "";
				while (!this.done) {
			
				}
			}
			
			if (clientMode) {
				this.client = new Socket(objectatHost, objectatPort);
				
				if (this.client.isConnected()) {
					this.logger.log(ObjectatLogLevel.DEBUG, this.getClass() + ": Starting client reader");					
					this.objectatClientReader = new ObjectatClientReader(this.client.getInputStream(), this.logger);
					this.objectatClientReaderThread = new Thread(this.objectatClientReader);
					this.objectatClientReaderThread.start();
				
					this.logger.log(ObjectatLogLevel.DEBUG, this.getClass() + ": Starting client writer");
					this.objectatClientWriter = new ObjectatClientWriter(this.client.getOutputStream(), this.logger, this.objectatEventJAXBContext);
										
					this.logger.log(ObjectatLogLevel.DEBUG, this.getClass() + ": Sending client message");
					this.objectatClientWriter.writeString("CLIENT");
					
					while (!this.done) {
						while (this.objectatClientReader.getBufferedMessages().size() > 0) {
							//this.logger.log(ObjectatLogLevel.DEBUG, this.getClass() + ": " + this.objectatClientReader.getBufferedMessages().get(0));
							this.objectatClientReader.getBufferedMessages().remove(0);
						}
						
						try {
							Thread.sleep(10);							
						} catch (Exception e) {
							
						}
					}
					
					this.objectatClientReader.setDone(true);
				}
			}
		} catch (Exception e) {
			// TODO
			// Catch/make more specific exception
			this.logger.log(ObjectatLogLevel.ERROR, this.getClass() + ": Exception while starting client.  Exception: " + e.getMessage());
		}
	}