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)

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

def self.bidirectional?
	true
end

.client(peer) ⇒ Object


39
40
41
42
43
# File 'lib/async/http/protocol/http11.rb', line 39

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

.namesObject


51
52
53
# File 'lib/async/http/protocol/http11.rb', line 51

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

.server(peer) ⇒ Object


45
46
47
48
49
# File 'lib/async/http/protocol/http11.rb', line 45

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

.trailer?Boolean

Returns:

  • (Boolean)

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

def self.trailer?
	true
end