Publish own custom service

Mar 5, 2009 at 7:17 PM
I've tried to create my own custom service:
Service s = new Service();
s.AddAddress(ResolverHelper.GetEndPoint());
s.Protocol = "_myservice._tcp";
s.Name = "MyName";
s.HostName = s.Addresses[0].DomainName;
s.Publish();
Thread.Sleep(3600000);
s.Stop();
And I tried to create a simple client searching for this service:
BonjourServiceResolver bsr = new BonjourServiceResolver();
bsr.ServiceFound += bsr_ServiceFound;
//Here, we look for the services :
//bsr.Resolve("_daap._tcp", new TimeSpan(0, 1, 30), 1, 10);
bsr.Resolve("_myservice._tcp");
These are two different visual studio projects, but I haven't been able to get these to communicate with each other. The client bsr_ServiceFound just prints the event data. Any pointers on how to get this working?
Coordinator
Mar 6, 2009 at 12:08 PM
Hello,

Since this is a network protocol, there may be some time needed to resolve your service. This is why in my sample, I used the blocking resolve method.

You should also try to set the protocol of your service to "_myservice._tcp._local." (with the final dot also). 
Mar 17, 2009 at 8:40 PM
I've tried to add the ._local. to the URL, but I still can't get the two services to speak with each other. Is it possible to add two sample projects which is a custom service publisher and a simple client. I think this would be beneficial for those interested in this library.
Coordinator
Mar 18, 2009 at 2:31 PM
have you also tried the blocking resolve method ?