Module: Async::HTTP::Protocol::HTTP10

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

Constant Summary collapse

VERSION =
"HTTP/1.0"

Class Method Summary collapse

Methods included from Configurable

new

Class Method Details

.bidirectional?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/async/http/protocol/http10.rb', line 18

def self.bidirectional?
	false
end

.client(peer, **options) ⇒ Object

Create a client for an outbound connection.



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

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

.namesObject



48
49
50
# File 'lib/async/http/protocol/http10.rb', line 48

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

.server(peer, **options) ⇒ Object

Create a server for an inbound connection.



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

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

.trailer?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/async/http/protocol/http10.rb', line 23

def self.trailer?
	false
end