class Async::HTTP::Protocol::Configured

A protocol wrapper that forwards pre-configured options to client and server creation.

def client(peer, **options)

@parameter options [Hash] Additional options merged with the configured defaults.
@parameter peer [IO] The peer to communicate with.
Create a client connection using the configured protocol options.
def client(peer, **options)
	options = @options.merge(options)
	@protocol.client(peer, **options)
end

def initialize(protocol, **options)

@parameter options [Hash] Options to forward to client and server creation.
@parameter protocol [Protocol] The underlying protocol to configure.
Initialize with a protocol and options.
def initialize(protocol, **options)
	@protocol = protocol
	@options = options
end

def names

@returns [Array(String)] The protocol names from the underlying protocol.
def names
	@protocol.names
end

def server(peer, **options)

@parameter options [Hash] Additional options merged with the configured defaults.
@parameter peer [IO] The peer to communicate with.
Create a server connection using the configured protocol options.
def server(peer, **options)
	options = @options.merge(options)
	@protocol.server(peer, **options)
end