Sha256: 2f933579d67badf1103595046a85ad9be61656bca3330a7c2f1198f708e87062

Contents?: true

Size: 707 Bytes

Versions: 7

Compression:

Stored size: 707 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2017-2023, by Samuel Williams.
# Copyright, 2018, by Janko Marohnić.

require_relative 'http1'

module Async
	module HTTP
		module Protocol
			module HTTP11
				VERSION = "HTTP/1.1"
				
				def self.bidirectional?
					true
				end
				
				def self.trailer?
					true
				end
				
				def self.client(peer)
					stream = IO::Stream.new(peer, sync: true)
					
					return HTTP1::Client.new(stream, VERSION)
				end
				
				def self.server(peer)
					stream = IO::Stream.new(peer, sync: true)
					
					return HTTP1::Server.new(stream, VERSION)
				end
				
				def self.names
					["http/1.1"]
				end
			end
		end
	end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
async-http-0.64.2 lib/async/http/protocol/http11.rb
async-http-0.64.1 lib/async/http/protocol/http11.rb
async-http-0.64.0 lib/async/http/protocol/http11.rb
async-http-0.63.0 lib/async/http/protocol/http11.rb
async-http-0.62.0 lib/async/http/protocol/http11.rb
async-http-0.61.0 lib/async/http/protocol/http11.rb
async-http-0.60.2 lib/async/http/protocol/http11.rb