Module: Async::HTTP::Protocol::HTTP11

Extended by:
Configurable
Defined in:
lib/async/http/protocol/http11.rb

Constant Summary collapse

VERSION =
"HTTP/1.1"

Class Method Summary collapse

Methods included from Configurable

new

Class Method Details

.bidirectional?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/async/http/protocol/http11.rb', line 19

def self.bidirectional?
	true
end

.client(peer, **options) ⇒ Object

Create a client for an outbound connection.



32
33
34
35
36
# File 'lib/async/http/protocol/http11.rb', line 32

def self.client(peer, **options)
	stream = ::IO::Stream(peer)
	
	return HTTP1::Client.new(stream, VERSION, **options)
end

.namesObject



49
50
51
# File 'lib/async/http/protocol/http11.rb', line 49

def self.names
	["http/1.1"]
end

.server(peer, **options) ⇒ Object

Create a server for an inbound connection.



42
43
44
45
46
# File 'lib/async/http/protocol/http11.rb', line 42

def self.server(peer, **options)
	stream = ::IO::Stream(peer)
	
	return HTTP1::Server.new(stream, VERSION, **options)
end

.trailer?Boolean

Returns:

  • (Boolean)


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

def self.trailer?
	true
end