package nfjs.jmdns;

import java.io.IOException;

import javax.jmdns.JmDNS;
import javax.jmdns.ServiceInfo;

public class SimpleRegisterService {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			JmDNS jmDNS = new JmDNS();
			// Right now we are embedding the byte length in the parameter because of a
			// but in the JmDNS implementation. That shouldn't normally be necessary.
			
			ServiceInfo si = new ServiceInfo("_fooService._tcp.local.", "nfjs", 10001, "" );
			jmDNS.registerService( si );
			
			System.in.read();
		} catch( IOException ioe ) {
			ioe.printStackTrace();
		}
	}
}
