Basics
Guides
API Reference
Basics
Guides
API Reference
[206:14] static extends: object
Generated metadata helpers for NetworkService class surfaces.
properties ()
Returns property metadata for
NetworkService.
A list.[18:7] extends: object
Like [class@Gio.NetworkAddress] 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
[struct@Gio.SrvTarget] for more information about SRV records, and see
[iface@Gio.SocketConnectable] for an example of using the connectable
interface.
NetworkService (service = null, protocol = null, domain = null)
Creates a new #GNetworkService representing the given @service,
and @domain. This will initially be unresolved; use the #GSocketConnectable interface to resolve it.service is the service type to look up (eg, "ldap").protocol is the networking protocol to use for @service (eg, "tcp").domain is the DNS domain to look up the service in.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.asSocketConnectable ()
Wraps this handle as
SocketConnectable.
A SocketConnectable object.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setScheme (string Value)
Network scheme (default is to use service).
Value is the new property value.None.get_domain ()
Gets the domain that @srv serves. This might be either UTF-8 or ASCII-encoded, depending on what @srv was created with.
get_protocol ()
Gets @srv's protocol name (eg, "tcp").
get_scheme ()
Gets the URI scheme used to resolve proxies. By default, the service name is used as scheme.
get_service ()
Gets @srv's service name (eg, "ldap").
set_scheme (string scheme)
Set's the URI scheme used to resolve proxies. By default, the service name is used as scheme.
scheme is a URI scheme.None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.