public void run() {
		try {
			setupConnections();

			while (true) {
				System.out.println("[SERVER] Wait for messages...");
				// Send message to server
				ObjectMessage msg = (ObjectMessage) m_receiver.receive();

				if (msg.getObject() instanceof Join) {
					Join m = (Join) msg.getObject();
					System.out.println("Received a Join message from " + m.getName());
					// Broadcast only if the client is not in the list
					if (!m_clients.contains(m.getName()))
						broadcast(m);
					sendClientResponse(m.getName());
				}
				if (msg.getObject() instanceof Send) {
					Send m = (Send) msg.getObject();
					System.out.println("Received a Send message from " + m.getName());
					broadcast(m);
				}
				if (msg.getObject() instanceof Leave) {
					Leave m = (Leave) msg.getObject();
					System.out.println("Received a Leave message from " + m.getName());
					// Remove the client and add the message in the history
					m_clients.remove(m.getName());
					m_histo.add(m);

				}
			}

		} catch (Exception e) {
			e.printStackTrace();
		}
	}