Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: NetworkServiceMeta

[206:14] static extends: object

Generated metadata helpers for NetworkService class surfaces.

Methods

  • properties ()

    Returns property metadata for NetworkService.

    • @r A list.

class: NetworkService

[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.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • NetworkService (service = null, protocol = null, domain = null)

    Creates a new #GNetworkService representing the given @service,

    • @protocol, and @domain. This will initially be unresolved; use the #GSocketConnectable interface to resolve it.
    • @p service is the service type to look up (eg, "ldap").
    • @p protocol is the networking protocol to use for @service (eg, "tcp").
    • @p 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 exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asSocketConnectable ()

    Wraps this handle as SocketConnectable.

    • @r 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).

    • @p Value is the new property value.
    • @r 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.

    • @p scheme is a URI scheme.
    • @r None.