![]() |
![]() |
![]() |
GIO Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
GInetSocketAddress; GSocketAddress * g_inet_socket_address_new (GInetAddress *address
,guint16 port
); GInetAddress * g_inet_socket_address_get_address (GInetSocketAddress *address
); guint16 g_inet_socket_address_get_port (GInetSocketAddress *address
); guint32 g_inet_socket_address_get_flowinfo (GInetSocketAddress *address
); guint32 g_inet_socket_address_get_scope_id (GInetSocketAddress *address
);
"address" GInetAddress* : Read / Write / Construct Only "flowinfo" guint : Read / Write / Construct Only "port" guint : Read / Write / Construct Only "scope-id" guint : Read / Write / Construct Only
An IPv4 or IPv6 socket address; that is, the combination of a GInetAddress and a port number.
typedef struct _GInetSocketAddress GInetSocketAddress;
An IPv4 or IPv6 socket address, corresponding to a struct sockaddr_in or struct sockaddr_in6.
GSocketAddress * g_inet_socket_address_new (GInetAddress *address
,guint16 port
);
Creates a new GInetSocketAddress for address
and port
.
|
a GInetAddress |
|
a port number |
Returns : |
a new GInetSocketAddress |
Since 2.22
GInetAddress * g_inet_socket_address_get_address (GInetSocketAddress *address
);
Gets address
's GInetAddress.
|
a GInetSocketAddress |
Returns : |
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.
|
a GInetSocketAddress |
Returns : |
the port for address
|
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.
|
a G_SOCKET_FAMILY_IPV6 GInetSocketAddress
|
Returns : |
the flowinfo field |
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.
|
a G_SOCKET_FAMILY_IPV6 GInetAddress
|
Returns : |
the scope id field |
Since 2.32
"flowinfo"
property"flowinfo" guint : Read / Write / Construct Only
The sin6_flowinfo
field, for IPv6 addresses.
Default value: 0
Since 2.32
"port"
property"port" guint : Read / Write / Construct Only
The port.
Allowed values: <= 65535
Default value: 0
"scope-id"
property"scope-id" guint : Read / Write / Construct Only
IPv6 scope ID.
Default value: 0