NetworkService

open class NetworkService(pointer: <Error class: unknown class><<Error class: unknown class>>) : SocketConnectable

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.

Constructors

Link copied to clipboard
constructor(service: String, protocol: String, domain: String)

Creates a new #GNetworkService representing the given @service,

constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val domain: String
Link copied to clipboard
val gioNetworkServicePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gioSocketConnectablePointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open val protocol: String
Link copied to clipboard
open var scheme: String
Link copied to clipboard
open val service: String

Functions

Link copied to clipboard

Creates a #GSocketAddressEnumerator for @connectable.

Link copied to clipboard
open fun getDomain(): String

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

Link copied to clipboard
open fun getProtocol(): String

Gets @srv's protocol name (eg, "tcp").

Link copied to clipboard
open fun getScheme(): String

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

Link copied to clipboard
open fun getService(): String

Gets @srv's service name (eg, "ldap").

Link copied to clipboard

Creates a #GSocketAddressEnumerator for @connectable that will return a #GProxyAddress for each of its addresses that you must connect to via a proxy.

Link copied to clipboard
open fun setScheme(scheme: String)

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