guint next_query_id;
+ int family;
+
int index;
GList *session_list;
web->next_query_id = 1;
+ web->family = AF_UNSPEC;
+
web->index = index;
web->session_list = NULL;
return TRUE;
}
+gboolean g_web_set_address_family(GWeb *web, int family)
+{
+ if (web == NULL)
+ return FALSE;
+
+ if (family != AF_UNSPEC && family != AF_INET && family != AF_INET6)
+ return FALSE;
+
+ web->family = family;
+
+ return TRUE;
+}
+
gboolean g_web_add_nameserver(GWeb *web, const char *address)
{
if (web == NULL)
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_flags = AI_NUMERICHOST;
+ hints.ai_family = session->web->family;
if (session->addr != NULL) {
freeaddrinfo(session->addr);
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_flags = AI_NUMERICHOST;
+ hints.ai_family = session->web->family;
if (session->addr != NULL) {
freeaddrinfo(session->addr);
gboolean g_web_set_proxy(GWeb *web, const char *proxy);
+gboolean g_web_set_address_family(GWeb *web, int family);
+
gboolean g_web_add_nameserver(GWeb *web, const char *address);
gboolean g_web_set_accept(GWeb *web, const char *format, ...)