Gio.InetSocketAddress¶
class — extends SocketAddress, SocketConnectable
An IPv4 or IPv6 socket address. That is, the combination of a
InetAddress and a port number.
In UNIX terms, GInetSocketAddress corresponds to a
struct sockaddr_in or struct sockaddr_in6.
Constructors¶
new¶
Creates a new InetSocketAddress for address and port.
Parameters:
address— aInetAddressport— a port number
new_from_string¶
Creates a new InetSocketAddress for address and port.
If address is an IPv6 address, it can also contain a scope ID
(separated from the address by a %). Note that currently this
behavior is platform specific. This may change in a future release.
Parameters:
address— the string form of an IP addressport— a port number
Methods¶
get_address¶
Gets address's InetAddress.
get_flowinfo¶
Gets the sin6_flowinfo field from address,
which must be an IPv6 address.
If not overridden this value will be inherited from InetSocketAddress.address.
get_port¶
Gets address's port.
get_scope_id¶
Gets the sin6_scope_id field from address,
which must be an IPv6 address.
If not overridden this value will be inherited from InetSocketAddress.address.
Properties¶
address¶
The address.
flowinfo¶
The sin6_flowinfo field, for IPv6 addresses.
If unset this property is inherited from InetSocketAddress.address.
port¶
The port.
scope_id¶
The sin6_scope_id field, for IPv6 addresses.
If unset this property is inherited from InetSocketAddress.address.