Gio.InetAddress

const Gio = imports.gi.Gio;

let inetAddress = new Gio.InetAddress({
    bytes: value,
    family: value,
});
  

Gio.InetAddress represents an IPv4 or IPv6 internet address. Use Gio.Resolver.prototype.lookup_by_name or Gio.Resolver.prototype.lookup_by_name_async to look up the Gio.InetAddress for a hostname. Use Gio.Resolver.prototype.lookup_by_address or Gio.Resolver.prototype.lookup_by_address_async to look up the hostname for a Gio.InetAddress.

To actually connect to a remote host, you will need a Gio.InetSocketAddress (which includes a Gio.InetAddress as well as a port number).

Hierarchy

  • GObject.Object
    • Gio.InetAddress