Module: Async::HTTP::Protocol::HTTP11
- Extended by:
- Configurable
- Defined in:
- lib/async/http/protocol/http11.rb
Overview
Provides an HTTP/1.1 client and server protocol implementation.
Constant Summary collapse
- VERSION =
"HTTP/1.1"
Class Method Summary collapse
- .bidirectional? ⇒ Boolean
-
.client(peer, **options) ⇒ Object
Create a client for an outbound connection.
- .names ⇒ Object
-
.server(peer, **options) ⇒ Object
Create a server for an inbound connection.
- .trailer? ⇒ Boolean
Methods included from Configurable
Class Method Details
.bidirectional? ⇒ Boolean
20 21 22 |
# File 'lib/async/http/protocol/http11.rb', line 20 def self.bidirectional? true end |
.client(peer, **options) ⇒ Object
Create a client for an outbound connection.
33 34 35 36 37 |
# File 'lib/async/http/protocol/http11.rb', line 33 def self.client(peer, **) stream = ::IO::Stream(peer) return HTTP1::Client.new(stream, VERSION, **) end |
.names ⇒ Object
50 51 52 |
# File 'lib/async/http/protocol/http11.rb', line 50 def self.names ["http/1.1"] end |
.server(peer, **options) ⇒ Object
Create a server for an inbound connection.
43 44 45 46 47 |
# File 'lib/async/http/protocol/http11.rb', line 43 def self.server(peer, **) stream = ::IO::Stream(peer) return HTTP1::Server.new(stream, VERSION, **) end |
.trailer? ⇒ Boolean
25 26 27 |
# File 'lib/async/http/protocol/http11.rb', line 25 def self.trailer? true end |