-g_tcp_client_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
+g_tcp_client_constructed (GObject *object)
+{
+ GTcpClient *client = G_TCP_CLIENT (object);
+
+ if (client->priv->address)
+ {
+ // we've been constructed with an address, extract hostname+port
+ client->priv->hostname = g_inet_address_to_string (g_inet_socket_address_get_address (client->priv->address));
+ client->priv->port = g_inet_socket_address_get_port (client->priv->address);
+ return;
+ }
+}
+
+static void
+g_tcp_client_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)