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

Defined in:
lib/async/http/protocol/http11.rb

Constant Summary collapse

VERSION =
"HTTP/1.1"

Class Method Summary collapse

Class Method Details

.bidirectional?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/async/http/protocol/http11.rb', line 16

def self.bidirectional?
	true
end

.client(peer) ⇒ Object



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

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

.namesObject



36
37
38
# File 'lib/async/http/protocol/http11.rb', line 36

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

.server(peer) ⇒ Object



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

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

.trailer?Boolean

Returns:

  • (Boolean)


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

def self.trailer?
	true
end