Basics
Guides
API Reference
Basics
Guides
API Reference
[20:7] extends: object
GInetAddress represents an IPv4 or IPv6 internet address. Use
[method@Gio.Resolver.lookup_by_name] or
[method@Gio.Resolver.lookup_by_name_async] to look up the GInetAddress for
a hostname. Use [method@Gio.Resolver.lookup_by_address] or
[method@Gio.Resolver.lookup_by_address_async] to look up the hostname for a
GInetAddress. To actually connect to a remote host, you will need a
[class@Gio.InetSocketAddress] (which includes a GInetAddress as well as a
port number).
InetAddress (family = null)
Creates a #GInetAddress for the "any" address (unassigned/"don't care") for @family.
family is the address family.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.equal (object other_address)
Checks if two #GInetAddress instances are equal, e.g. the same address.
other_address is Another #GInetAddress..get_family ()
Gets @address's family
get_is_any ()
Tests whether @address is the "any" address for its family.
get_is_link_local ()
Tests whether @address is a link-local address (that is, if it identifies a host on a local network that is not connected to the Internet).
get_is_loopback ()
Tests whether @address is the loopback address for its family.
get_is_mc_global ()
Tests whether @address is a global multicast address.
get_is_mc_link_local ()
Tests whether @address is a link-local multicast address.
get_is_mc_node_local ()
Tests whether @address is a node-local multicast address.
get_is_mc_org_local ()
Tests whether @address is an organization-local multicast address.
get_is_mc_site_local ()
Tests whether @address is a site-local multicast address.
get_is_multicast ()
Tests whether @address is a multicast address.
get_is_site_local ()
Tests whether @address is a site-local address such as 10.0.0.1 (that is, the address identifies a host on a local network that can not be reached directly from the Internet, but which may have outgoing Internet connectivity via a NAT or firewall).
get_native_size ()
Gets the size of the native raw binary address for @address. This is the size of the data that you get from g_inet_address_to_bytes().
to_string ()
Converts @address to string form.
[282:14] static extends: object
Generated metadata helpers for InetAddress class surfaces.
properties ()
Returns property metadata for
InetAddress.
A list.[248:14] static extends: object
Alternate constructors for InetAddress. Usage:
InetAddressCtors.<name>(...). The primary constructor lives
directly on InetAddress.
newFromString (string arg0String)
Parses @string as an IP address and creates a new #GInetAddress. If
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.string is a string representation of an IP address.A new InetAddress.newLoopback (string family)
Creates a #GInetAddress for the loopback address for @family.
family is the address family.A new InetAddress.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.