Class: Gio::InetAddress
- Inherits:
-
Object
- Object
- Gio::InetAddress
- Defined in:
- lib/gio2/inet-address.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#bytes ⇒ GObject
The raw address data.
-
#bytes=(bytes) ⇒ GObject
The raw address data.
-
#equal(other_address) ⇒ Boolean
Checks if two GInet::Address instances are equal, e.g.
-
#family ⇒ Gio::SocketFamily
The address family (IPv4 or IPv6).
-
#family=(family) ⇒ Gio::SocketFamily
The address family (IPv4 or IPv6).
-
#initialize(family) ⇒ Gio::InetAddress
constructor
Creates a GInet::Address for the loopback address for family.
-
#is_any ⇒ Boolean
Tests whether address is the "any" address for its family.
-
#is_any=(is_any) ⇒ Boolean
Whether this is the "any" address for its family.
-
#is_any? ⇒ Boolean
Whether this is the "any" address for its family.
-
#is_link_local ⇒ Boolean
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).
-
#is_link_local=(is_link_local) ⇒ Boolean
Whether this is a link-local address.
-
#is_link_local? ⇒ Boolean
Whether this is a link-local address.
-
#is_loopback ⇒ Boolean
Tests whether address is the loopback address for its family.
-
#is_loopback=(is_loopback) ⇒ Boolean
Whether this is the loopback address for its family.
-
#is_loopback? ⇒ Boolean
Whether this is the loopback address for its family.
-
#is_mc_global ⇒ Boolean
Tests whether address is a global multicast address.
-
#is_mc_global=(is_mc_global) ⇒ Boolean
Whether this is a global multicast address.
-
#is_mc_global? ⇒ Boolean
Whether this is a global multicast address.
-
#is_mc_link_local ⇒ Boolean
Tests whether address is a link-local multicast address.
-
#is_mc_link_local=(is_mc_link_local) ⇒ Boolean
Whether this is a link-local multicast address.
-
#is_mc_link_local? ⇒ Boolean
Whether this is a link-local multicast address.
-
#is_mc_node_local ⇒ Boolean
Tests whether address is a node-local multicast address.
-
#is_mc_node_local=(is_mc_node_local) ⇒ Boolean
Whether this is a node-local multicast address.
-
#is_mc_node_local? ⇒ Boolean
Whether this is a node-local multicast address.
-
#is_mc_org_local ⇒ Boolean
Tests whether address is an organization-local multicast address.
-
#is_mc_org_local=(is_mc_org_local) ⇒ Boolean
Whether this is an organization-local multicast address.
-
#is_mc_org_local? ⇒ Boolean
Whether this is an organization-local multicast address.
-
#is_mc_site_local ⇒ Boolean
Tests whether address is a site-local multicast address.
-
#is_mc_site_local=(is_mc_site_local) ⇒ Boolean
Whether this is a site-local multicast address.
-
#is_mc_site_local? ⇒ Boolean
Whether this is a site-local multicast address.
-
#is_multicast ⇒ Boolean
Tests whether address is a multicast address.
-
#is_multicast=(is_multicast) ⇒ Boolean
Whether this is a multicast address.
-
#is_multicast? ⇒ Boolean
Whether this is a multicast address.
-
#is_site_local ⇒ Boolean
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).
-
#is_site_local=(is_site_local) ⇒ Boolean
Whether this is a site-local address.
-
#is_site_local? ⇒ Boolean
Whether this is a site-local address.
-
#native_size ⇒ Integer
Gets the size of the native raw binary address for address.
-
#to_bytes ⇒ Integer
Gets the raw binary address data from address.
-
#to_string ⇒ String
Converts address to string form.
Constructor Details
#initialize(family) ⇒ Gio::InetAddress
Creates a GInet::Address for the loopback address for family. for family. Free the returned object with g_object_unref().
Class Method Details
.any(family) ⇒ Object
20 21 22 23 24 |
# File 'lib/gio2/inet-address.rb', line 20 def any(family) address = allocate address.__send__(:initialize_new_any, family) address end |
.loopback(family) ⇒ Object
26 27 28 29 30 |
# File 'lib/gio2/inet-address.rb', line 26 def loopback(family) address = allocate address.__send__(:initialize_new_loopback, family) address end |
Instance Method Details
#bytes ⇒ GObject
The raw address data.
#bytes=(bytes) ⇒ GObject
The raw address data.
#equal(other_address) ⇒ Boolean
Checks if two GInet::Address instances are equal, e.g. the same address.
#family ⇒ Gio::SocketFamily
The address family (IPv4 or IPv6).
#family=(family) ⇒ Gio::SocketFamily
The address family (IPv4 or IPv6).
#is_any ⇒ Boolean
Tests whether address is the "any" address for its family.
#is_any=(is_any) ⇒ Boolean
Whether this is the "any" address for its family. See g_inet_address_get_is_any().
#is_any? ⇒ Boolean
Whether this is the "any" address for its family. See g_inet_address_get_is_any().
#is_link_local ⇒ Boolean
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).
#is_link_local=(is_link_local) ⇒ Boolean
Whether this is a link-local address. See g_inet_address_get_is_link_local().
#is_link_local? ⇒ Boolean
Whether this is a link-local address. See g_inet_address_get_is_link_local().
#is_loopback ⇒ Boolean
Tests whether address is the loopback address for its family.
#is_loopback=(is_loopback) ⇒ Boolean
Whether this is the loopback address for its family. See g_inet_address_get_is_loopback().
#is_loopback? ⇒ Boolean
Whether this is the loopback address for its family. See g_inet_address_get_is_loopback().
#is_mc_global ⇒ Boolean
Tests whether address is a global multicast address.
#is_mc_global=(is_mc_global) ⇒ Boolean
Whether this is a global multicast address. See g_inet_address_get_is_mc_global().
#is_mc_global? ⇒ Boolean
Whether this is a global multicast address. See g_inet_address_get_is_mc_global().
#is_mc_link_local ⇒ Boolean
Tests whether address is a link-local multicast address.
#is_mc_link_local=(is_mc_link_local) ⇒ Boolean
Whether this is a link-local multicast address. See g_inet_address_get_is_mc_link_local().
#is_mc_link_local? ⇒ Boolean
Whether this is a link-local multicast address. See g_inet_address_get_is_mc_link_local().
#is_mc_node_local ⇒ Boolean
Tests whether address is a node-local multicast address.
#is_mc_node_local=(is_mc_node_local) ⇒ Boolean
Whether this is a node-local multicast address. See g_inet_address_get_is_mc_node_local().
#is_mc_node_local? ⇒ Boolean
Whether this is a node-local multicast address. See g_inet_address_get_is_mc_node_local().
#is_mc_org_local ⇒ Boolean
Tests whether address is an organization-local multicast address.
#is_mc_org_local=(is_mc_org_local) ⇒ Boolean
Whether this is an organization-local multicast address. See g_inet_address_get_is_mc_org_local().
#is_mc_org_local? ⇒ Boolean
Whether this is an organization-local multicast address. See g_inet_address_get_is_mc_org_local().
#is_mc_site_local ⇒ Boolean
Tests whether address is a site-local multicast address.
#is_mc_site_local=(is_mc_site_local) ⇒ Boolean
Whether this is a site-local multicast address. See g_inet_address_get_is_mc_site_local().
#is_mc_site_local? ⇒ Boolean
Whether this is a site-local multicast address. See g_inet_address_get_is_mc_site_local().
#is_multicast ⇒ Boolean
Tests whether address is a multicast address.
#is_multicast=(is_multicast) ⇒ Boolean
Whether this is a multicast address. See g_inet_address_get_is_multicast().
#is_multicast? ⇒ Boolean
Whether this is a multicast address. See g_inet_address_get_is_multicast().
#is_site_local ⇒ Boolean
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).
#is_site_local=(is_site_local) ⇒ Boolean
Whether this is a site-local address. See g_inet_address_get_is_loopback().
#is_site_local? ⇒ Boolean
Whether this is a site-local address. See g_inet_address_get_is_loopback().
#native_size ⇒ Integer
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_bytes ⇒ Integer
Gets the raw binary address data from address. which should not be modified, stored, or freed. The size of this array can be gotten with g_inet_address_get_native_size().
#to_string ⇒ String
Converts address to string form. freed after use.