pike.git
/
src
/
modules
/
_Protocols_DNS_SD
/
sd.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/_Protocols_DNS_SD/sd.c:1:
/* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: sd.c,v 1.
3
2005/10/
13
09
:
08
:
57
nilsson
Exp $
+
|| $Id: sd.c,v 1.
4
2005/10/
22
03
:
22
:
06
bill
Exp $
*/ /* Glue for DNS Service Discovery, which is built on top of e.g. Multicast DNS (ZeroConf/Rendezvous). Using this API a Pike program can register a service (e.g. a web server) and have other applications on the local network detect it without additional configuration. The specification can be found at <http://www.dns-sd.org/>.
pike.git/src/modules/_Protocols_DNS_SD/sd.c:147:
if (domain && !strlen(domain)) domain = NULL; if (txt && !txtlen) txt = NULL; svc->service_ref = NULL; err = DNSServiceRegister(&ref, 0, 0, name, service, domain, NULL, port, txtlen, txt, start_service_callback, NULL); if (err == kDNSServiceErr_NoError) svc->service_ref = ref;
+
+
err = DNSServiceProcessResult(ref);
return err; } static void stop_service(struct service *svc) { if (svc->service_ref) { DNSServiceRefDeallocate(svc->service_ref); svc->service_ref = NULL; }