[Mono-list] mono-zerofconf 0.8 on linux doesn't work sometimes

MikeSem mike.semlitsch at kraemer-it.de
Tue May 26 06:09:21 EDT 2009


Hello Forum,

i am running the VM-Ware-Image with openSuse11.1 from the mono page. I have
installed mono-zeroconf and mono-zeroconf-provider-avahi both in version
0.8.0-1.29.

The browsing for services doens't work sometimes. I am starting a new thread
in which the following lines of code are executed:

ServiceBrowser browser = new ServiceBrowser ();
browser.ServiceAdded += new ServiceBrowseEventHandler(browser_ServiceAdded);   
browser.Browse ("someRegType", "someDomain");

The following ServiceBrowse-eventhandler is called EVERY time previous
thread is started, thats ok:

private void browser_ServiceAdded(object o, ServiceBrowseEventArgs args) {
       args.Service.Resolved += new
ServiceResolvedEventHandler(Service_Resolved);
       args.Service.Resolve();
}

BUT this ServiceResolved-eventhandler DOESN'T get called from the new
thread:

private void Service_Resolved(object o, ServiceResolvedEventArgs args) {
      ----> This eventhandler 
}

If i start a second thread immediately after the first thread that execute
the same code like above, the ServiceResolved-eventhandler now get called.

This problem is independent from the duration i set the thread of the
main-method sleep while waiting for the execution of the browse-thread.

Why doesn't get the service resolved at the first time but by the second
try? 

The communication partner is a windows machine with mono-zeroconf version
2.0.0.76. Is maybe the difference in the version number the problem? 

Sincerely
Mike


-- 
View this message in context: http://www.nabble.com/mono-zerofconf-0.8-on-linux-doesn%27t-work-sometimes-tp23720248p23720248.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list