public UnicastReceiver(NetInterface net, int preferredPort) {
		this.net = net;
		this.port = preferredPort;
		connections = new ArrayList<UnicastReceiver.AcceptedConnectionThread>(
				NetInterface.NB_UNICAST_CONNECTIONS);
		InetAddress inetAddress;
		try {
			inetAddress = InetAddress.getByName(Address.getDefaultIPAddress());
			try {
				serverSocket = new ServerSocket(port, NetInterface.NB_UNICAST_CONNECTIONS,
						inetAddress);
			} catch (SocketException e) {
				serverSocket = new ServerSocket(0, NetInterface.NB_UNICAST_CONNECTIONS,
						inetAddress);
				if (verbose) {
					System.out.println("Net: unicast port " + port
							+ " already used. Using "
							+ serverSocket.getLocalPort() + " instead.");
				}
				port = serverSocket.getLocalPort();
			}
			address = new Address(serverSocket.getInetAddress()
					.getHostAddress(), port);
			if (verbose) {
				System.out.println("Net: unicast receiver ready at " + address);
			}
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(40);
		}
		start();
	}