@Override
		public void run() {
			ObjectInputStream in;
			
			try {
				in = new ObjectInputStream(socket.getInputStream());
				
				while (true) {
					Message message = (Message) in.readObject();
					
					if (message instanceof RelayMessage) {
						RelayMessage relayMessage = (RelayMessage) message;
						System.out.println(getDate() + " [" + relayMessage.getFrom() + "] " + relayMessage.getMessage());
					} else if (message instanceof StatusMessage) {
						StatusMessage statusMessage = (StatusMessage) message;
						System.out.println(getDate() + " [Server] " + statusMessage.getMessage());
					}
				}
				
			} catch (IOException e) {
				System.err.println("Cannot connect to " + server + " on port " + port + ".");
				return;
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
				return;
			}
		}