How to register a service with Mono.ZeroConf?
Posted
by pablo
on Stack Overflow
See other posts from Stack Overflow
or by pablo
Published on 2009-03-01T13:47:54Z
Indexed on
2010/04/10
22:43 UTC
Read the original article
Hit count: 491
Hi,
I'm trying to test the ZeroConf sample at http://www.mono-project.com/Mono.Zeroconf.
I'm running OpenSuse 11 and Mono 2.2.
My server code is:
using System;
using Mono.Zeroconf;
namespace zeroconftestserver
{
class MainClass
{
public static void Main(string[] args)
{
RegisterService service = new RegisterService ();
service.Name = "test server";
service.RegType = "_daap._tcp";
service.ReplyDomain = "local.";
service.Port = 6060;
// TxtRecords are optional
TxtRecord txt_record = new TxtRecord ();
txt_record.Add ("Password", "false");
service.TxtRecord = txt_record;
service.Register();
Console.WriteLine("Service registered!");
Console.ReadLine();
}
}
}
But I can't find my registered service with the sample client browser code nor with mzclient.
Thanks!
© Stack Overflow or respective owner