Module: Async::HTTY::Protocol::HTTY
- Defined in:
- lib/async/htty/protocol/htty.rb
Class Method Summary collapse
- .client(stream, settings: ::Async::HTTP::Protocol::HTTP2::CLIENT_SETTINGS) ⇒ Object
- .names ⇒ Object
- .server(stream, settings: ::Async::HTTP::Protocol::HTTP2::SERVER_SETTINGS) ⇒ Object
Class Method Details
.client(stream, settings: ::Async::HTTP::Protocol::HTTP2::CLIENT_SETTINGS) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/async/htty/protocol/htty.rb', line 14 def self.client(stream, settings: ::Async::HTTP::Protocol::HTTP2::CLIENT_SETTINGS) stream = ::Protocol::HTTY::Stream.open(stream, bootstrap: :read) client = ::Async::HTTP::Protocol::HTTP2::Client.new(stream) client.send_connection_preface(settings) client.start_connection return client end |
.names ⇒ Object
34 35 36 |
# File 'lib/async/htty/protocol/htty.rb', line 34 def self.names ["htty"] end |
.server(stream, settings: ::Async::HTTP::Protocol::HTTP2::SERVER_SETTINGS) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/async/htty/protocol/htty.rb', line 24 def self.server(stream, settings: ::Async::HTTP::Protocol::HTTP2::SERVER_SETTINGS) stream = ::Protocol::HTTY::Stream.open(stream, bootstrap: :write) server = ::Async::HTTP::Protocol::HTTP2::Server.new(stream) server.read_connection_preface(settings) server.start_connection return server end |