Commit Graph

10 Commits

Author SHA1 Message Date
Boris Pek cf3a6e06df Secure URLs: http --> https (part 2) 2019-04-23 15:59:03 +02:00
Tillmann Karras 3d0b652ec9 Remove some unused variables 2014-10-06 21:02:08 +02:00
Jan Vidar Krey 46bdc77066 Added a notification mechanism for sending messages from
another thread to the mainthread in a safe manner.

This is used for the DNS lookup code, and can also
be used by the signal handler to safely report actions back
to the application mainloop without using global variables.
2014-08-05 16:21:56 +02:00
Jan Vidar Krey 1526d63403 Simplify list_clear(), allow NULL as free() function pointer.
This makes it redundant to create a null_free() or dummy_free() function
that does nothing.
2014-08-05 13:08:46 +02:00
Jan Vidar Krey 7706e1cb8a Fix copyright year. 2014-05-14 11:39:18 +02:00
Jan Vidar Krey b81bb2cbd9 Cleaned up all list iterations, added macro named LIST_FOREACH.
Previously you would have to do something like this:

for (type foo = (type) list_get_first(list); foo; foo = (type) list_get_next(list)
{
    /* code */
}

Now, you can instead write this as:

LIST_FOREACH(type, foo, list,
{
    /* code */
})

Basically, boilerplate stuff including the casting is gone.
2013-03-22 00:58:14 +01:00
Jan Vidar Krey 92b65a0e14 Created a connection establishment API.
This API provides transparent asynchronous DNS lookups
with both IPv4 and IPv6 support, and in addition will try
to connect to all addresses until one of them work.

This implements the "happy eyeballs" algorithm provided that the client supports IPv6
and that the DNS records provides both IPv6 and IPv4 addresses.
2013-02-05 22:40:20 +01:00
Jan Vidar Krey 38b19f633d Fix memory leaks and report "host is not found" correctly. 2012-10-25 04:13:05 +02:00
Jan Vidar Krey 470c936e63 Converted the DNS resolver to work with the new threading API abstraction. 2012-10-25 00:40:16 +02:00
Jan Vidar Krey 793790d089 Initial implementation of an async DNS client API with getaddrinfo + pthreads. 2012-10-24 23:19:14 +02:00