Class: DNSSD::Reply

Inherits:
Object
  • Object
show all
Defined in:
ext/rdnssd_structs.c,
ext/rdnssd_structs.c

Overview

DNSSD::Reply is used to return information

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#DNSSD::Reply.newraises a RuntimeError



569
570
571
572
573
574
# File 'ext/rdnssd_structs.c', line 569

static VALUE
reply_initialize(int argc, VALUE *argv, VALUE reply)
{
	dnssd_instantiation_error(rb_obj_classname(reply));
	return Qnil;
}

Instance Attribute Details

#domainObject (readonly)

The service domain.

#flagsObject (readonly)

Flags describing the reply. See DNSSD::Flags for more information.

#fullnameObject (readonly)

The full service domain name, in the form “<servicename>.<protocol>.<domain>.”. (Any literal dots (“.”) are escaped with a backslash (“.”), and literal backslashes are escaped with a second backslash (“\”), e.g. a web server named “Dr. Pepper” would have the fullname “Dr.032Pepper._http._tcp.local.”.) See DNSSD::Service.fullname() for more information.

#interfaceObject (readonly)

The interface on which the service is available. (Used only by DNSSSD.resolve().)

#nameObject (readonly)

The service name. (Not used by DNSSD.enumerate_domains().)

#portObject (readonly)

The port on which connections are accepted for this service.

#serviceObject (readonly)

The service associated with the reply. See DNSSD::Service for more information.

#targetObject (readonly)

The target hostname of the machine providing the service. This name can be passed to functions like Socket.gethostbyname() to identify the host’s IP address.

#text_recordObject (readonly)

The service’s primary text record, see DNSSD::TextRecord for more information.

#typeObject (readonly)

The service type. (Not used by DNSSD.enumerate_domains().)

Instance Method Details

#inspectString

Returns:

  • (String)


557
558
559
560
561
562
# File 'ext/rdnssd_structs.c', line 557

static VALUE
reply_inspect(VALUE self)
{
	VALUE fullname = rb_ivar_get(self, dnssd_iv_fullname);
	return dnssd_struct_inspect(self, StringValue(fullname));
}