Sha256: e61e8bb2bce0cd9bc2dc363333924af2fc2532566abd458248a5b4dc4696a06d

Contents?: true

Size: 716 Bytes

Versions: 9

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

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

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(peer)
					
					return HTTP1::Client.new(stream, VERSION)
				end
				
				def self.server(peer)
					stream = ::IO::Stream(peer)
					
					return HTTP1::Server.new(stream, VERSION)
				end
				
				def self.names
					["http/1.1"]
				end
			end
		end
	end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
async-http-0.76.0 lib/async/http/protocol/http11.rb
async-http-0.75.0 lib/async/http/protocol/http11.rb
async-http-0.74.0 lib/async/http/protocol/http11.rb
async-http-0.73.0 lib/async/http/protocol/http11.rb
async-http-0.72.0 lib/async/http/protocol/http11.rb
async-http-0.71.0 lib/async/http/protocol/http11.rb
async-http-0.70.0 lib/async/http/protocol/http11.rb
async-http-0.69.0 lib/async/http/protocol/http11.rb
async-http-0.68.0 lib/async/http/protocol/http11.rb