Sha256: 32bd313220e611879c5c58a0e3be1558f05b06b2710c443b8b53c52592b04d58

Contents?: true

Size: 750 Bytes

Versions: 5

Compression:

Stored size: 750 Bytes

Contents

# frozen_string_literal: true

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

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

require 'io/stream/buffered'

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
async-http-0.66.2 lib/async/http/protocol/http1.rb
async-http-0.66.1 lib/async/http/protocol/http1.rb
async-http-0.66.0 lib/async/http/protocol/http1.rb
async-http-0.65.1 lib/async/http/protocol/http1.rb
async-http-0.65.0 lib/async/http/protocol/http1.rb