Module: Async::HTTP::Protocol::HTTP1
- Extended by:
- Configurable
- Defined in:
- lib/async/http/protocol/http1.rb,
lib/async/http/protocol/http1/client.rb,
lib/async/http/protocol/http1/server.rb,
lib/async/http/protocol/http1/request.rb,
lib/async/http/protocol/http1/response.rb,
lib/async/http/protocol/http1/connection.rb,
lib/async/http/protocol/http1/finishable.rb
Defined Under Namespace
Classes: Client, Connection, Finishable, Request, Response, Server
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
23 24 25 |
# File 'lib/async/http/protocol/http1.rb', line 23 def self.bidirectional? true end |
.client(peer, **options) ⇒ Object
Create a client for an outbound connection.
36 37 38 39 40 |
# File 'lib/async/http/protocol/http1.rb', line 36 def self.client(peer, **) stream = ::IO::Stream(peer) return HTTP1::Client.new(stream, VERSION, **) end |
.names ⇒ Object
53 54 55 |
# File 'lib/async/http/protocol/http1.rb', line 53 def self.names ["http/1.1", "http/1.0"] end |
.server(peer, **options) ⇒ Object
Create a server for an inbound connection.
46 47 48 49 50 |
# File 'lib/async/http/protocol/http1.rb', line 46 def self.server(peer, **) stream = ::IO::Stream(peer) return HTTP1::Server.new(stream, VERSION, **) end |
.trailer? ⇒ Boolean
28 29 30 |
# File 'lib/async/http/protocol/http1.rb', line 28 def self.trailer? true end |