Sha256: d1bd5de113e33fbb1a93640aabd164938f7778960ac3e0eaaa4a7190aa2ade44

Contents?: true

Size: 718 Bytes

Versions: 7

Compression:

Stored size: 718 Bytes

Contents

# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2017-2023, by Samuel Williams.

require_relative 'http1/client'
require_relative 'http1/server'

module Async
	module HTTP
		module Protocol
			module HTTP1
				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", "http/1.0"]
				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/http1.rb
async-http-0.64.1 lib/async/http/protocol/http1.rb
async-http-0.64.0 lib/async/http/protocol/http1.rb
async-http-0.63.0 lib/async/http/protocol/http1.rb
async-http-0.62.0 lib/async/http/protocol/http1.rb
async-http-0.61.0 lib/async/http/protocol/http1.rb
async-http-0.60.2 lib/async/http/protocol/http1.rb