FileDocCategorySizeDatePackage
TestBrowse.javaAPI DocExample1360Thu Jul 07 07:41:50 BST 2005None

TestBrowse

public class TestBrowse extends Object implements BrowseListener

Fields Summary
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 voidmain(java.lang.String[] args)

		try { new TestBrowse(); }
		catch (Exception e)
			{
			//System.err.println(e.getMessage());
			e.printStackTrace();
			System.exit(-1);
			} 
		
public voidoperationFailed(DNSSDService service, int errorCode)

		System.out.println("Browse failed " + errorCode);
		System.exit(-1);
		
public voidserviceFound(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 voidserviceLost(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);