Sha256: 839676a6c760e2c3452d6d2cc8c653afd406e8412a2799f597ace2dc54e91a26

Contents?: true

Size: 826 Bytes

Versions: 16

Compression:

Stored size: 826 Bytes

Contents

# frozen_string_literal: true

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

require_relative "protocol/http1"
require_relative "protocol/https"

module Async
	module HTTP
		# A protocol specifies a way in which to communicate with a remote peer.
		module Protocol
			# A protocol must implement the following interface:
			# class Protocol
			# 	def client(stream) -> Connection
			# 	def server(stream) -> Connection
			# end
			
			# A connection must implement the following interface:
			# class Connection
			# 	def concurrency -> can invoke call 1 or more times simultaneously.
			# 	def reusable? -> can be used again/persistent connection.
			
			# 	def viable? -> Boolean
			
			# 	def call(request) -> Response
			# 	def each -> (yield(request) -> Response)
			# end
		end
	end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
async-http-0.87.0 lib/async/http/protocol.rb
async-http-0.86.0 lib/async/http/protocol.rb
async-http-0.85.0 lib/async/http/protocol.rb
async-http-0.84.0 lib/async/http/protocol.rb
async-http-0.83.1 lib/async/http/protocol.rb
async-http-0.83.0 lib/async/http/protocol.rb
async-http-0.82.3 lib/async/http/protocol.rb
async-http-0.82.2 lib/async/http/protocol.rb
async-http-0.82.1 lib/async/http/protocol.rb
async-http-0.82.0 lib/async/http/protocol.rb
async-http-0.81.0 lib/async/http/protocol.rb
async-http-0.80.1 lib/async/http/protocol.rb
async-http-0.80.0 lib/async/http/protocol.rb
async-http-0.79.0 lib/async/http/protocol.rb
async-http-0.78.0 lib/async/http/protocol.rb
async-http-0.77.0 lib/async/http/protocol.rb