Top |
An IPv4 or IPv6 socket address; that is, the combination of a GInetAddress and a port number.
GSocketAddress * g_inet_socket_address_new (GInetAddress *address
,guint16 port
);
Creates a new GInetSocketAddress for address
and port
.
Since: 2.22
GSocketAddress * g_inet_socket_address_new_from_string (const char *address
,guint port
);
Creates a new GInetSocketAddress for address
and port
.
If address
is an IPv6 address, it can also contain a scope ID
(separated from the address by a "<literal>%</literal>").
Since: 2.40
GInetAddress *
g_inet_socket_address_get_address (GInetSocketAddress *address
);
Gets address
's GInetAddress.
the GInetAddress for address
, which must be
g_object_ref()
'd if it will be stored.
[transfer none]
Since: 2.22
guint16
g_inet_socket_address_get_port (GInetSocketAddress *address
);
Gets address
's port.
Since: 2.22
guint32
g_inet_socket_address_get_flowinfo (GInetSocketAddress *address
);
Gets the sin6_flowinfo
field from address
,
which must be an IPv6 address.
Since: 2.32
guint32
g_inet_socket_address_get_scope_id (GInetSocketAddress *address
);
Gets the sin6_scope_id
field from address
,
which must be an IPv6 address.
Since: 2.32
“flowinfo”
property“flowinfo” guint
The sin6_flowinfo
field, for IPv6 addresses.
Flags: Read / Write / Construct Only
Default value: 0
Since: 2.32
“port”
property“port” guint
The port.
Flags: Read / Write / Construct Only
Allowed values: <= 65535
Default value: 0
“scope-id”
property“scope-id” guint
IPv6 scope ID.
Flags: Read / Write / Construct Only
Default value: 0