1.61 <GNetworkService>

Class: <GNetworkService>

It derives from <GObject>.

Like <GNetworkAddress> does with hostnames, <GNetworkService> provides an easy way to resolve a SRV record, and then attempt to connect to one of the hosts that implements that service, handling service priority/weighting, multiple IP addresses, and multiple address families.

See <GSrvTarget> for more information about SRV records, and see <GSocketConnectable> for an example of using the connectable interface.

Fields

parent-instance

Properties

Property: network-service:domain self

Network domain, for example example.com.

Its value is a string, or #f.

It can only be set when the object is made, with #:domain.

Property: network-service:protocol self

Network protocol, for example tcp.

Its value is a string, or #f.

It can only be set when the object is made, with #:protocol.

Property: network-service:scheme self

Network scheme (default is to use service).

Its value is a string, or #f.

Set it with (set! (network-service:scheme self) value).

Property: network-service:service self

Service name, for example ldap.

Its value is a string, or #f.

It can only be set when the object is made, with #:service.

Procedures

Method: network-service:get-domain self ⇒ %return
Method: get-domain self ⇒ %return

Gets the domain that self serves. This might be either UTF-8 or ASCII-encoded, depending on what self was created with.

self

Passed: a <GNetworkService>.

a <GNetworkService>

%return

Returned: a string.

self’s domain name

Method: network-service:get-protocol self ⇒ %return
Method: get-protocol self ⇒ %return

Gets self’s protocol name (eg, "tcp").

self

Passed: a <GNetworkService>.

a <GNetworkService>

%return

Returned: a string.

self’s protocol name

Method: network-service:get-scheme self ⇒ %return
Method: get-scheme self ⇒ %return

Gets the URI scheme used to resolve proxies. By default, the service name is used as scheme.

self

Passed: a <GNetworkService>.

a <GNetworkService>

%return

Returned: a string.

self’s scheme name

Method: network-service:get-service self ⇒ %return
Method: get-service self ⇒ %return

Gets self’s service name (eg, "ldap").

self

Passed: a <GNetworkService>.

a <GNetworkService>

%return

Returned: a string.

self’s service name

Procedure: network-service:new service protocol domain ⇒ %return

Creates a new <GNetworkService> representing the given service, protocol, and domain. This will initially be unresolved; use the <GSocketConnectable> interface to resolve it.

service

Passed: a string.

the service type to look up (eg, "ldap")

protocol

Passed: a string.

the networking protocol to use for service (eg, "tcp")

domain

Passed: a string.

the DNS domain to look up the service in

%return

Returned: a <GNetworkService>.

a new <GNetworkService>

Method: network-service:set-scheme self scheme
Method: set-scheme self scheme

Set’s the URI scheme used to resolve proxies. By default, the service name is used as scheme.

self

Passed: a <GNetworkService>.

a <GNetworkService>

scheme

Passed: a string.

a URI scheme