Avahi.EntryGroup.AddService C# (CSharp) Method

AddService() public method

public AddService ( PublishFlags flags, string name, string type, string domain, UInt16 port ) : void
flags PublishFlags
name string
type string
domain string
port System.UInt16
return void
        public void AddService(PublishFlags flags, string name, string type, string domain,
                                UInt16 port, params string[] txt)
        {
            AddService (-1, Protocol.Unspecified, flags, name, type, domain, null, port, txt);
        }

Same methods

EntryGroup::AddService ( int iface, Protocol proto, PublishFlags flags, string name, string type, string domain, string host, UInt16 port ) : void
EntryGroup::AddService ( int iface, Protocol proto, PublishFlags flags, string name, string type, string domain, string host, UInt16 port, IntPtr list ) : void
EntryGroup::AddService ( string name, string type, string domain, UInt16 port ) : void

Usage Example

    public static void Main()
    {
        client = new Client ();

        Console.WriteLine ("joined service name: " + Client.JoinServiceName ("FooBar", "_foo", "local"));

        EntryGroup eg = new EntryGroup (client);
        eg.StateChanged += OnEntryGroupChanged;
        eg.AddService ("foobar2", "_dingdong._tcp", client.DomainName,
                       444, new string[] { "foo=stuff", "bar=stuff2", "baz=stuff3" });
        eg.Commit ();
        BrowseServiceTypes ("local");
        Console.WriteLine ("Press enter to quit");
        Console.ReadLine ();
    }
All Usage Examples Of Avahi.EntryGroup::AddService