63#if defined (__linux__)
71#if defined (__linux__)
76 , simplePoll_(
nullptr)
80#if defined (__linux__)
81 start(
"mDNS Server", 0, 2048);
82 printf(
"mDNS client start\n");
107 void publish(
const char *name,
const char *service, uint16_t port);
113 void unpublish(
const char *name,
const char *service);
119#if defined (__linux__)
120 avahi_entry_group_commit(group_);
140 static void scan(
const char *service);
143#if defined (__linux__)
144 struct LookupUserdata
146 LookupUserdata(
const struct addrinfo *h)
178 static void resolve_callback(AvahiServiceResolver *r,
179 AvahiIfIndex interface, AvahiProtocol protocol,
180 AvahiResolverEvent event,
const char *name,
181 const char *type,
const char *domain,
182 const char *host_name,
183 const AvahiAddress *address, uint16_t port,
184 AvahiStringList *txt,
185 AvahiLookupResultFlags flags,
void* userdata);
198 static void browse_callback(AvahiServiceBrowser *b, AvahiIfIndex interface,
199 AvahiProtocol protocol, AvahiBrowserEvent event,
200 const char *name,
const char *type,
202 AvahiLookupResultFlags flags,
void* userdata);
209 static void entry_group_callback(AvahiEntryGroup *g,
210 AvahiEntryGroupState state,
void *userdata);
217 static void client_callback(AvahiClient *c, AvahiClientState state,
223 void *entry()
override;
229 AvahiEntryGroup *group_;
232 AvahiSimplePoll *simplePoll_;
235 AvahiClient *client_;