19 Commits

Author SHA1 Message Date
HoneyryderChuck
2940323412 implemented happy eyeballs v2 (rfc8305) for native and https resolver
Two resolver are kept (IPv6/IPv4) along in the pool, to which all
names are sent to and read from in the same pool. IPv4 resolves are
subject to a 50ms delay (as per rfc) before they're used for connecting.
IPv6 addresses have preference, in that if they arrive before the delay,
they are immediately used. If they arrive after the delay, they do not
interrupt the connection, but they'll be the next-in-line in case
connection handshake fails.

Two resolvers are kept, but the inherent Connection will be shared,
thereby sending name resolving requests to the same HTTP/2 connection in
bulk. The resolution delay logic from above also applies.

Currently handles resolving via `resolv` lib. This happens synchronously
though, so we're not there yet.
2022-01-16 22:54:56 +02:00
HoneyryderChuck
06b162b6ea applying a resolver manager to hold the different family type resolvers for the pool. This allows to have multiple resolvers per type, i.e. IPv6 and IPv4 2022-01-16 22:54:56 +02:00
HoneyryderChuck
9bd73e5a22 removing uncaching of resolved names (not used anywhere) 2022-01-16 22:54:54 +02:00
HoneyryderChuck
a8830681df changing resolver structure to rely on inheritance, which helps with typing 2022-01-16 22:53:36 +02:00
HoneyryderChuck
15a4fb83ba options: also freeze inner unfrozen vars; fixed message of resolve
timeout to include host
2022-01-15 01:38:14 +02:00
HoneyryderChuck
cdcbf14675 few sig changes (more assertive) 2021-08-31 13:50:29 +01:00
HoneyryderChuck
e1ee8c69dc proxy: fixing proxy resolve error filtering to also work with system resolver 2021-08-10 11:10:45 +01:00
HoneyryderChuck
6b61b8ccdb fixing signatures
also adding some checks on code, in order for steep to stop complaining
about potential nil returns.
2021-08-10 10:28:58 +01:00
HoneyryderChuck
fbe8a16b1c small sig fixes 2021-07-13 20:04:38 +01:00
HoneyryderChuck
cab5a94d31 removing setters from Options, which weren't public API anyway 2021-07-13 19:56:59 +01:00
HoneyryderChuck
b6ee019014 several signature improvements while testing with steep 2021-07-07 19:21:36 +01:00
HoneyryderChuck
b569cc9984 adding the settings timeout as an option, as well as a specific error 2021-05-30 00:53:37 +01:00
HoneyryderChuck
1cf6e5aac7 new option: origin
by setting the origin, one can pass relative paths to httpx, which will
be appended when building the request.
2021-05-04 20:09:50 +01:00
HoneyryderChuck
bf0ec99794 removed the timeout class 2021-04-08 17:34:19 +01:00
HoneyryderChuck
9363d09af8 removed with_ methods from option (not of real world use)
removed with_ options, which are unsupported, undocumented and irrelevant (contrary to the similar with session methods)
2021-03-23 16:30:45 +00:00
HoneyryderChuck
fbf9b12a0b bugfix: ensuring :io option as hash works
while adding tests, found out that io as hash of authority => io wasn't
working due to missing uri extensions. Made sure the same works for unix
sockets.
2021-03-08 17:04:36 +00:00
HoneyryderChuck
0fb343056d introducing :addresses option
(This deprecates the :transport_options option)

This should be given an array of peer addresses to connect to. It can be
used when the destination IPs are known and you want to avoid resolving
them, and when the destination is a unix socket (and the destination is
a FS path)
2021-03-08 12:46:20 +00:00
HoneyryderChuck
a675fde7dd enable singleton usage in rbs sigs 2020-12-02 01:30:38 +00:00
HoneyryderChuck
936a8533a7 initial signatures for typed ruby 2020-10-27 17:00:44 +00:00