class
Cryload::PhasedClient
- Cryload::PhasedClient
- HTTP::Client
- Reference
- Object
Overview
HTTP::Client that splits connection setup into DNS, TCP connect and TLS
handshake timings.
HTTP::Client resolves and connects lazily inside its private #io, so
overriding that is the only place the three phases can be measured
separately without giving up automatic reconnection when a keep-alive
connection is dropped. Handing a pre-connected socket to
HTTP::Client.new(io, ...) would measure the phases just as well but marks
the client non-reconnectable, which turns every server-side keep-alive
timeout into a hard failure. That is also why the HTTPS-over-proxy CONNECT
tunnel is opened here rather than by the caller.
Defined in:
cryload/phased_client.crConstructors
Instance Method Summary
- #connections_opened : Int64
- #last_connect_ms : Float64
- #last_dns_ms : Float64
-
#last_tls_ms : Float64 | Nil
Nil when the last connection carried no TLS handshake, so a plain HTTP run reports zero handshakes instead of a run of zero-millisecond ones.
Constructor Detail
Instance Method Detail
Nil when the last connection carried no TLS handshake, so a plain HTTP run reports zero handshakes instead of a run of zero-millisecond ones.