[Mono-bugs] [Bug 565767] Bonjour (NSNetServices) bindings not fully functional

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 6 15:41:24 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=565767

http://bugzilla.novell.com/show_bug.cgi?id=565767#c4


--- Comment #4 from Cenk Alti <cenkalti at gmail.com> 2010-01-06 20:41:22 UTC ---
(In reply to comment #2)
> @Centk: The method is called FoundService.
> 
> @Marc, how did you hook up your code to receive notifications?   Did you attach
> event handlers, or provide a delegate method?

True, the method was FoundService. I published a service with following code:

NSNetService s = new NSNetService("", "_senk._tcp", "", 2000);
s.Delegate = new MyNetServiceDelegate();
s.Publish();

No problem with publishing. I can confirm this from the terminal:

donatello:~ cenk$ dns-sd -B _senk._tcp local
Browsing for _senk._tcp.local
Timestamp     A/R Flags if Domain                    Service Type             
Instance Name
22:36:13.673  Add     2  5 local.                    _senk._tcp.              
donatello

However, browsing still does not work. Here is my browsing code:

NSNetServiceBrowser b = new NSNetServiceBrowser();
b.Delegate = new MyNetServiceBrowserDelegate();
b.SearchForServices(new NSString("_senk._tcp"), new NSString(""));

public class MyNetServiceBrowserDelegate : NSNetServiceBrowserDelegate
{
    public override void FoundService (NSNetServiceBrowser netServiceBrowser,
NSNetService netService, bool moreServicesComing)
    {
        Console.WriteLine("Found service."); 
        Console.WriteLine(netService); 
        Console.WriteLine(netServiceBrowser);
    }
}

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list