@Override
	public void run() {
		// loop to receive broadcasted UDP packets
		active = true;
		DatagramPacket packet = new DatagramPacket(
				new byte[NetInterface.UDP_PACKET_SIZE],
				NetInterface.UDP_PACKET_SIZE);
		while (active) {
			try {
				// blocks thread until reception of a packet
				if (verbose) {
					System.out
							.println(("Net: broadcast receiver blocked on receive"));
				}
				socket.receive(packet);
				if (verbose) {
					System.out.println("Net: broadcast receiver received "
							+ packet.getLength() + " bytes");
				}
				ByteArrayInputStream bais = new ByteArrayInputStream(
						packet.getData());
				ObjectInputStream ois = new ObjectInputStream(bais);
				Address senderAddress = (Address) ois.readObject();
				Serializable obj = (Serializable) ois.readObject();
				net.notifyBroadcastReception(senderAddress, obj);
			} catch (SocketException e) {
				// socket closed by call to close()
				active = false;
				if (verbose) {
					System.out
							.println(("Net: closing broadcast receiver socket... done"));
				}
			} catch (IOException e) {
				System.out
						.println("Net: broadcast receiver closing after unexpected IO exception");
				e.printStackTrace();
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
			}
		}
	}