예제 #1
0
  public Register(String name, int port) throws DNSSDException, InterruptedException {

    Synchronisateur sy = new Synchronisateur();

    if (sy.synchronisation(4150)) {

      System.out.println("Registration Starting");
      System.out.println("Requested Name: " + name);
      System.out.println("          Port: " + port);

      DNSSDRegistration r =
          DNSSD.register(name, "_ebsf_socket._udp", port, (RegisterListener) this);

      Thread.sleep(60000); // Wait thirty seconds, then exit
      System.out.println("Registration Stopping");
      r.stop();
    }
  }
 public void stop() {
   logger.info("Registration Stopping");
   dnss.stop();
 }