Executes AUTH after the user has established a connection.
Definitionsdef initialize(index, protocol = Async::Redis::Protocol::RESP2)
Create a new authenticated protocol.
Signatureindex
Integer
The database index to select.
protocol
Object
The delegated protocol for connecting.
def initialize(index, protocol = Async::Redis::Protocol::RESP2)
@index = index
@protocol = protocol
end
def client(stream)
Create a new client and authenticate it.
Implementationdef client(stream)
client = @protocol.client(stream)
client.write_request(["SELECT", @index])
response = client.read_response
if response != "OK"
raise SelectionError, "Could not select database: #{response}"
end
return client
end
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4