EsRedisSslConnectionOptions
Description
A configuration object used to specify the parameters for connecting securely to a Redis server using SSL/TLS. It extends EsRedisConnectionOptions to include SSL-specific settings. It allows for setting the connection endpoint (host/port), timeouts, and the required SSL configuration.
Instances are typically created using the class-side convenience method #ssl.
Instance Variables
-
type - <Integer> The connection type (REDISCONNTCP or REDISCONNUNIX).
-
host - <String> The hostname for a TCP connection.
-
port - <Integer> The port number for a TCP connection.
-
path - <String> The file path for a Unix socket connection.
-
connectTimeout - <Duration> The timeout for establishing a connection.
-
commandTimeout - <Duration> The timeout for individual commands.
-
connectTimeoutStruct - <OSUInt8> The low-level C structure for the connect timeout.
-
commandTimeoutStruct - <OSUInt8> The low-level C structure for the command timeout.
-
sslConfiguration - <SciSslSocketConfiguration> The configuration object that specifies
SSL/TLS parameters like CA certificates, client certificates, and private keys.
Examples
| sslConfig sslOptions |
"First, create the SSL configuration"
sslConfig := SciSslSocketConfiguration new
caFile: '/path/to/ca.pem';
certificateFilename: '/path/to/client-cert.pem';
privateKeyFilename: '/path/to/client-key.pem';
yourself.
"Then, create the Redis SSL connection options"
sslOptions := EsRedisSslConnectionOptions ssl
host: '127.0.0.1';
port: 6380; "Secure Redis port"
commandTimeout: 5 seconds;
sslConfiguration: sslConfig.
Class Methods
ssl
Answer a new options object configured for a secure TCP connection.
Answers:
<EsRedisSslConnectionOptions>
Instance Methods
establishConnectionFor:
Establish a secure SSL/TLS connection and answer the connected socket.
This method overrides the base implementation to handle SSL-specific setup.
Arguments:
aClient - <EsRedisClient> The client requesting the connection.
Answers:
<SciSslSocket> The connected and secured socket.
Raises:
<EsRedisConnectionException> If any part of the connection or SSL handshake fails.
sslConfiguration
Answer the SSL configuration object.
Answers:
<SciSslSocketConfiguration>
sslConfiguration:
Set the SSL configuration object.
Arguments:
anSciSslSocketConfiguration - <SciSslSocketConfiguration>
Last modified date: 01/22/2026