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

Methods included from Configurable

new

Class Method Details

.bidirectional?Boolean

Returns:

  • (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, **options)
	stream = ::IO::Stream(peer)
	
	return HTTP1::Client.new(stream, VERSION, **options)
end

.namesObject



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, **options)
	stream = ::IO::Stream(peer)
	
	return HTTP1::Server.new(stream, VERSION, **options)
end

.trailer?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/async/http/protocol/http11.rb', line 25

def self.trailer?
	true
end