Package com.limelight.nvstream.mdns

Examples of com.limelight.nvstream.mdns.MdnsDiscoveryAgent


  }
 
  public void discover(final boolean first) {
    displayMessage("Discovering GeForce PCs...");
    final Object mutex = new Object();
    MdnsDiscoveryAgent agent = new MdnsDiscoveryAgent(new MdnsDiscoveryListener() {
      @Override
      public void notifyComputerAdded(MdnsComputer computer) {
        displayMessage(" " + computer.getName() + " " + computer.getAddress().getHostAddress());
        host = computer.getAddress();
        if (first)
          synchronized (mutex) {
            mutex.notify();
          }
      }

      @Override
      public void notifyComputerRemoved(MdnsComputer computer) {
      }

      @Override
      public void notifyDiscoveryFailure(Exception e) {
      }
    });
    agent.startDiscovery(1000);
    synchronized (mutex) {
      try {
        mutex.wait();
      } catch (InterruptedException ex) { }
    }
    agent.stopDiscovery();
  }
View Full Code Here

TOP

Related Classes of com.limelight.nvstream.mdns.MdnsDiscoveryAgent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.