TestBrowsepublic class TestBrowse extends Object implements BrowseListener
Constructors Summary |
---|
public TestBrowse()
System.out.println("TestBrowse Starting");
DNSSDService b = DNSSD.browse("_example._tcp", this);
System.out.println("TestBrowse Running");
Thread.sleep(30000);
System.out.println("TestBrowse Stopping");
b.stop();
|
Methods Summary |
---|
public static void | main(java.lang.String[] args)
try { new TestBrowse(); }
catch (Exception e)
{
//System.err.println(e.getMessage());
e.printStackTrace();
System.exit(-1);
}
| public void | operationFailed(DNSSDService service, int errorCode)
System.out.println("Browse failed " + errorCode);
System.exit(-1);
| public void | serviceFound(DNSSDService browser, int flags, int ifIndex, java.lang.String name, java.lang.String regType, java.lang.String domain)
System.out.println("Add flags:" + flags + ", ifIndex:" + ifIndex +
", Name:" + name + ", Type:" + regType + ", Domain:" + domain);
| public void | serviceLost(DNSSDService browser, int flags, int ifIndex, java.lang.String name, java.lang.String regType, java.lang.String domain)
System.out.println("Rmv flags:" + flags + ", ifIndex:" + ifIndex +
", Name:" + name + ", Type:" + regType + ", Domain:" + domain);
|
|