]> git.meshlink.io Git - catta/blobdiff - avahi-sharp/AvahiTest.cs
lose the dep on avahi-glib, and run the avahi loop in a thread
[catta] / avahi-sharp / AvahiTest.cs
index 1679ee288c74bf227354529cb10ccd9a8677cd9b..042bc28fa5a7f8ff2316a61229c2eef1078232cd 100644 (file)
@@ -20,6 +20,7 @@
 ***/
 
 using System;
+using System.Text;
 using System.Net;
 using Gtk;
 using Avahi;
@@ -72,7 +73,10 @@ public class AvahiTest {
 
        private static void OnServiceResolved (object o, ServiceInfo info)
        {
-               Console.WriteLine ("Service '{0}' at {1}:{2}", info.Name, info.Host, info.Port);
+               Console.WriteLine ("Service '{0}' at {1}:{2}", info.Name, info.HostName, info.Port);
+               foreach (byte[] bytes in info.Text) {
+                       Console.WriteLine ("Text: " + Encoding.UTF8.GetString (bytes));
+               }
                AddressResolver ar = new AddressResolver (client, info.Address);
                ar.Found += OnAddressResolved;
        }