class Async::HTTP::Protocol::HTTP1::Connection
def initialize(stream, version, **options)
@parameter version [String] The negotiated HTTP version string.
@parameter stream [IO::Stream] The underlying stream.
Initialize the connection with an IO stream and HTTP version.
def initialize(stream, version, **options) super(stream, **options) # On the client side, we need to send the HTTP version with the initial request. On the server side, there are some scenarios (bad request) where we don't know the request version. In those cases, we use this value, which is either hard coded based on the protocol being used, OR could be negotiated during the connection setup (e.g. ALPN). @version = version end