A SocketConnectable for resolving hostnames. More...
#include <giomm/networkaddress.h>

Public Member Functions | |
| virtual | ~NetworkAddress () |
| GNetworkAddress* | gobj () |
| Provides access to the underlying C GObject. | |
| const GNetworkAddress* | gobj () const |
| Provides access to the underlying C GObject. | |
| GNetworkAddress* | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
| std::string | get_hostname () const |
| Gets addr's hostname. | |
| guint16 | get_port () const |
| Gets addr's port number. | |
| std::string | get_scheme () const |
| Glib::PropertyProxy_ReadOnly < std::string > | property_hostname () const |
| Hostname to resolve. | |
| Glib::PropertyProxy_ReadOnly < guint > | property_port () const |
| Network port. | |
| Glib::PropertyProxy_ReadOnly < std::string > | property_scheme () const |
| URI Scheme. | |
Static Public Member Functions | |
| static Glib::RefPtr < NetworkAddress > | create (const std::string& hostname, guint16 port) |
| static Glib::RefPtr < NetworkAddress > | parse (const std::string& host_and_port, guint16 default_port) |
Related Functions | |
(Note that these are not member functions.) | |
| Glib::RefPtr< Gio::NetworkAddress > | wrap (GNetworkAddress* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
A SocketConnectable for resolving hostnames.
NetworkAddress provides an easy way to resolve a hostname and then attempt to connect to that host, handling the possibility of multiple IP addresses and multiple address families.
| virtual Gio::NetworkAddress::~NetworkAddress | ( | ) | [virtual] |
| static Glib::RefPtr<NetworkAddress> Gio::NetworkAddress::create | ( | const std::string & | hostname, | |
| guint16 | port | |||
| ) | [static] |
| std::string Gio::NetworkAddress::get_hostname | ( | ) | const |
Gets addr's hostname.
This might be either UTF-8 or ASCII-encoded, depending on what addr was created with.
| guint16 Gio::NetworkAddress::get_port | ( | ) | const |
| std::string Gio::NetworkAddress::get_scheme | ( | ) | const |
| const GNetworkAddress* Gio::NetworkAddress::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gio::SocketConnectable.
| GNetworkAddress* Gio::NetworkAddress::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gio::SocketConnectable.
| GNetworkAddress* Gio::NetworkAddress::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
| static Glib::RefPtr<NetworkAddress> Gio::NetworkAddress::parse | ( | const std::string & | host_and_port, | |
| guint16 | default_port | |||
| ) | [static] |
| Glib::PropertyProxy_ReadOnly<std::string> Gio::NetworkAddress::property_hostname | ( | ) | const |
Hostname to resolve.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<guint> Gio::NetworkAddress::property_port | ( | ) | const |
Network port.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::PropertyProxy_ReadOnly<std::string> Gio::NetworkAddress::property_scheme | ( | ) | const |
URI Scheme.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| Glib::RefPtr< Gio::NetworkAddress > wrap | ( | GNetworkAddress * | object, | |
| bool | take_copy = false | |||
| ) | [related] |
A Glib::wrap() method for this object.
| object | The C instance. | |
| take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
1.6.3