lib/async/http/protocol/https.rb in async-http-0.48.2 vs lib/async/http/protocol/https.rb in async-http-0.49.0

- old
+ new

@@ -53,28 +53,28 @@ "http/1.1" => HTTP11, "http/1.0" => HTTP10, nil => HTTP11, } - def self.protocol_for(stream) + def self.protocol_for(peer) # alpn_protocol is only available if openssl v1.0.2+ - name = stream.io.alpn_protocol + name = peer.alpn_protocol Async.logger.debug(self) {"Negotiating protocol #{name.inspect}..."} if protocol = HANDLERS[name] return protocol else throw ArgumentError.new("Could not determine protocol for connection (#{name.inspect}).") end end - def self.client(stream) - protocol_for(stream).client(stream) + def self.client(peer) + protocol_for(peer).client(peer) end - def self.server(stream) - protocol_for(stream).server(stream) + def self.server(peer) + protocol_for(peer).server(peer) end # Supported Application Layer Protocol Negotiation names: def self.names HANDLERS.keys.compact