gi-gio-2.0.12: Gio bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.NetworkService

Contents

Description

Like NetworkAddress does with hostnames, NetworkService 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 SrvTarget for more information about SRV records, and see SocketConnectable for and example of using the connectable interface.

Synopsis

Exported types

Methods

getDomain

networkServiceGetDomain Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> m Text

Returns: srv's domain name

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

Since: 2.22

getProtocol

networkServiceGetProtocol Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> m Text

Returns: srv's protocol name

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

Since: 2.22

getScheme

networkServiceGetScheme Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> m Text

Returns: srv's scheme name

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

Since: 2.26

getService

networkServiceGetService Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> m Text

Returns: srv's service name

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

Since: 2.22

new

networkServiceNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

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

-> Text

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

-> Text

domain: the DNS domain to look up the service in

-> m NetworkService

Returns: a new NetworkService

Creates a new NetworkService representing the given service, protocol, and domain. This will initially be unresolved; use the SocketConnectable interface to resolve it.

Since: 2.22

setScheme

networkServiceSetScheme Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> Text

scheme: a URI scheme

-> m () 

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

Since: 2.26

Properties

domain

data NetworkServiceDomainPropertyInfo Source #

Instances

AttrInfo NetworkServiceDomainPropertyInfo Source # 
type AttrOrigin NetworkServiceDomainPropertyInfo Source # 
type AttrLabel NetworkServiceDomainPropertyInfo Source # 
type AttrGetType NetworkServiceDomainPropertyInfo Source # 
type AttrBaseTypeConstraint NetworkServiceDomainPropertyInfo Source # 
type AttrSetTypeConstraint NetworkServiceDomainPropertyInfo Source # 
type AttrAllowedOps NetworkServiceDomainPropertyInfo Source # 

protocol

data NetworkServiceProtocolPropertyInfo Source #

Instances

AttrInfo NetworkServiceProtocolPropertyInfo Source # 
type AttrOrigin NetworkServiceProtocolPropertyInfo Source # 
type AttrLabel NetworkServiceProtocolPropertyInfo Source # 
type AttrGetType NetworkServiceProtocolPropertyInfo Source # 
type AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo Source # 
type AttrSetTypeConstraint NetworkServiceProtocolPropertyInfo Source # 
type AttrAllowedOps NetworkServiceProtocolPropertyInfo Source # 

scheme

data NetworkServiceSchemePropertyInfo Source #

Instances

AttrInfo NetworkServiceSchemePropertyInfo Source # 
type AttrOrigin NetworkServiceSchemePropertyInfo Source # 
type AttrLabel NetworkServiceSchemePropertyInfo Source # 
type AttrGetType NetworkServiceSchemePropertyInfo Source # 
type AttrBaseTypeConstraint NetworkServiceSchemePropertyInfo Source # 
type AttrSetTypeConstraint NetworkServiceSchemePropertyInfo Source # 
type AttrAllowedOps NetworkServiceSchemePropertyInfo Source # 

service

data NetworkServiceServicePropertyInfo Source #

Instances

AttrInfo NetworkServiceServicePropertyInfo Source # 
type AttrOrigin NetworkServiceServicePropertyInfo Source # 
type AttrLabel NetworkServiceServicePropertyInfo Source # 
type AttrGetType NetworkServiceServicePropertyInfo Source # 
type AttrBaseTypeConstraint NetworkServiceServicePropertyInfo Source # 
type AttrSetTypeConstraint NetworkServiceServicePropertyInfo Source # 
type AttrAllowedOps NetworkServiceServicePropertyInfo Source #