public void sendBroadcast(Serializable content) throws IOException {
		// create broadcast if necessary
		if (broadcastSocket == null) {
			broadcastSocket = new DatagramSocket();
			broadcastSocket.setBroadcast(true);
		}

		// transform the object into a byte array
		// the message contains both the object and the address of the sender
		ByteArrayOutputStream baos = new ByteArrayOutputStream(UDP_PACKET_SIZE);
		ObjectOutputStream os = new ObjectOutputStream(baos);
		os.writeObject(getAddress());
		os.writeObject(content);
		byte[] data = baos.toByteArray();
		os.close();

		// send the byte array as a broadcast message
		DatagramPacket packet = new DatagramPacket(data, data.length);
		packet.setAddress(InetAddress.getByName(BROADCAST_ADDRESS));
		// use several ports for the case of several applications running on
		// the same machine; they are then listening on different ports
		int startPort = BROADCAST_PORT;
		int endPort = BROADCAST_PORT + NB_BROADCAST_PORTS - 1;
		for (int port = startPort; port < endPort; port++) {
			packet.setPort(port);
			broadcastSocket.send(packet);
		}
		if (verbose) {
			System.out.println("Net: sender broadcasted " + content + " on ports "
					+ startPort + ".." + endPort);
		}
	}