Module: Async::HTTP::Protocol::HTTP1

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

Defined Under Namespace

Classes: Client, Connection, Request, Response, Server

Constant Summary collapse

VERSION =
"HTTP/1.1"

Class Method Summary collapse

Class Method Details

.bidirectional?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/async/http/protocol/http1.rb', line 17

def self.bidirectional?
	true
end

.client(peer) ⇒ Object



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

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

.namesObject



37
38
39
# File 'lib/async/http/protocol/http1.rb', line 37

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

.server(peer) ⇒ Object



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

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

.trailer?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/async/http/protocol/http1.rb', line 21

def self.trailer?
	true
end