Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2022-09-23 05:51:01 +0300
committerMichael Grunder <michael.grunder@gmail.com>2022-09-23 05:55:14 +0300
commitb7bf22d4c95ebb275702b9c93ae46c45f21faae2 (patch)
tree1c3dee2914643a281368300ae9819a68906a30d6
parent21c3ef94e848642fb44c0da8812ddb31b30c750d (diff)
Add an example with a unix socket and timeout
See: #1663
-rw-r--r--README.markdown1
1 files changed, 1 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown
index 5f354763..43a1a2b2 100644
--- a/README.markdown
+++ b/README.markdown
@@ -243,6 +243,7 @@ $redis->connect('tls://127.0.0.1'); // enable transport level security, port 637
$redis->connect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout.
$redis->connect('/tmp/redis.sock'); // unix domain socket.
$redis->connect('127.0.0.1', 6379, 1, NULL, 100); // 1 sec timeout, 100ms delay between reconnection attempts.
+$redis->connect('/tmp/redis.sock', 0, 1.5, NULL, 0, 1.5); // Unix socket with 1.5s timeouts (connect and read)
/* With PhpRedis >= 5.3.0 you can specify authentication and stream information on connect */
$redis->connect('127.0.0.1', 6379, 1, NULL, 0, 0, ['auth' => ['phpredis', 'phpredis']]);