Method: DNSSD::Service.fullname

Defined in:
ext/dnssd/service.c

.DNSSD::Service.fullname(name, type, domain) ⇒ Object

Concatenate a three-part domain name like DNSSD::Reply#fullname into a properly-escaped full domain name.

Any dots or slashes in the name must NOT be escaped.

name may be nil (to construct a PTR record name, e.g. “_ftp._tcp.apple.com”).

The type is the service type followed by the protocol, separated by a dot (e.g. “_ftp._tcp”).

The domain is the domain name, e.g. “apple.com”. Any literal dots or backslashes must be escaped.

Raises ArgumentError if the full service name cannot be constructed from the arguments.



106
107
108
109
110
111
112
113
114
115
# File 'ext/dnssd/service.c', line 106

static VALUE
dnssd_service_s_fullname(VALUE klass, VALUE _name, VALUE _type, VALUE _domain) {
  char * name, * type, * domain;

  dnssd_utf8_cstr(_name, name);
  dnssd_utf8_cstr(_type, type);
  dnssd_utf8_cstr(_domain, domain);

  return create_fullname(name, type, domain);
}