Gio.NetworkService¶
| Subclasses: | None |
|---|
Methods¶
| Inherited: | GObject.Object (37), Gio.SocketConnectable (3) |
|---|---|
| Structs: | GObject.ObjectClass (5) |
| class | new (service, protocol, domain) |
get_domain () |
|
get_protocol () |
|
get_scheme () |
|
get_service () |
|
set_scheme (scheme) |
Virtual Methods¶
| Inherited: | GObject.Object (7), Gio.SocketConnectable (3) |
|---|
Properties¶
| Name | Type | Flags | Short Description |
|---|---|---|---|
domain |
str |
r/w/co | Network domain, eg, “example.com” |
protocol |
str |
r/w/co | Network protocol, eg “tcp” |
scheme |
str |
r/w | Network scheme (default is to use service) |
service |
str |
r/w/co | Service name, eg “ldap” |
Signals¶
| Inherited: | GObject.Object (1) |
|---|
Class Details¶
-
class
Gio.NetworkService(**kwargs)¶ Bases: GObject.Object,Gio.SocketConnectableAbstract: No Structure: Gio.NetworkServiceClassLike
Gio.NetworkAddressdoes with hostnames,Gio.NetworkServiceprovides 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
Gio.SrvTargetfor more information about SRV records, and seeGio.SocketConnectablefor an example of using the connectable interface.-
classmethod
new(service, protocol, domain)[source]¶ Parameters: Returns: a new
Gio.NetworkServiceReturn type: Creates a new
Gio.NetworkServicerepresenting the given service, protocol, and domain. This will initially be unresolved; use theGio.SocketConnectableinterface to resolve it.New in version 2.22.
-
get_domain()[source]¶ Returns: self’s domain name Return type: strGets the domain that self serves. This might be either UTF-8 or ASCII-encoded, depending on what self was created with.
New in version 2.22.
-
get_protocol()[source]¶ Returns: self’s protocol name Return type: strGets self’s protocol name (eg, “tcp”).
New in version 2.22.
-
get_scheme()[source]¶ Returns: self’s scheme name Return type: strGets the URI scheme used to resolve proxies. By default, the service name is used as scheme.
New in version 2.26.
-
classmethod
Property Details¶
-
Gio.NetworkService.props.domain¶ Name: domainType: strDefault Value: NoneFlags: READABLE,WRITABLE,CONSTRUCT_ONLYNetwork domain, eg, “example.com”
-
Gio.NetworkService.props.protocol¶ Name: protocolType: strDefault Value: NoneFlags: READABLE,WRITABLE,CONSTRUCT_ONLYNetwork protocol, eg “tcp”