Module: Async::HTTY::Protocol::HTTY
- Defined in:
- lib/async/htty/protocol/htty.rb,
lib/async/htty/protocol/htty/server.rb
Defined Under Namespace
Classes: Server
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
15 16 17 18 19 20 21 22 23 |
# File 'lib/async/htty/protocol/htty.rb', line 15 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
35 36 37 |
# File 'lib/async/htty/protocol/htty.rb', line 35 def self.names ["htty"] end |
.server(stream, settings: ::Async::HTTP::Protocol::HTTP2::SERVER_SETTINGS) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/async/htty/protocol/htty.rb', line 25 def self.server(stream, settings: ::Async::HTTP::Protocol::HTTP2::SERVER_SETTINGS) stream = ::Protocol::HTTY::Stream.open(stream, bootstrap: :write) server = Server.new(stream) server.read_connection_preface(settings) server.start_connection return server end |