This project is read-only.

How to publish services

To publish services, you need many things :
  1. What kind of services you want to publish (the protocol)
  2. the name of your service
  3. The metadata of your service

	Service s = new Service();
	s.AddAddress(ResolverHelper.GetEndPoint());
	s.Protocol = "_touch-able._tcp.local.";
	s.Name = "MyName";
	s.HostName = s.Addresses[0].DomainName;
	
	//The indexer on the service enables to set metadatas
	s["DvNm"] = "PC Remote";
	s["RemV"] = "10000";
	s["DvTy"] = "iPod";
	s["RemN"] = "Remote";
	s["txtvers"] = "1";
	s["Pair"] = "0000000000000001";
	
	//After setting all this, the only thing left to do is to publish your service
	s.Publish();
	Thread.Sleep(3600000);
	s.Stop();

Last edited Feb 12, 2009 at 2:28 PM by neonp, version 1

Comments

No comments yet.