class Async::HTTP::Protocol::HTTP2::Client
Public Class Methods
new(stream)
click to toggle source
Calls superclass method
Async::HTTP::Protocol::HTTP2::Connection::new
# File lib/async/http/protocol/http2/client.rb, line 35 def initialize(stream) @stream = stream framer = ::Protocol::HTTP2::Framer.new(@stream) super(framer) end
Public Instance Methods
call(request)
click to toggle source
Used by the client to send requests to the remote server.
# File lib/async/http/protocol/http2/client.rb, line 48 def call(request) raise ::Protocol::HTTP2::Error, "Connection closed!" if self.closed? @count += 1 response = create_response response.send_request(request) response.wait return response end
create_response()
click to toggle source
# File lib/async/http/protocol/http2/client.rb, line 43 def create_response Response::Stream.create(self, self.next_stream_id).response end