@Override
        public final void run() {
        	System.out.println("============= MulticastReceiverThread ================");
            byte[] buf = new byte[1024];
            try {
                while (!stopped) {
                    DatagramPacket packet = new DatagramPacket(buf, buf.length);
                    try {
                    	System.out.println("MulticastReceiverThread: Waiting for packet ...");
                    	receivingSocket.receive(packet);
                    	String source = packet.getAddress().getHostAddress();
                        byte[] payload = packet.getData();
                        String content = new String(payload);
                        Message msg = new Message(content, source);
                        listener.onMessage(msg);
                    } catch (IOException e) {
                        if (!stopped) {
                            System.out.println("Error receiving heartbeat. " + e.getMessage() );
                        }
                    }
                }
            } catch (Throwable t) {
                t.printStackTrace();
            }
 }