8000 Support for setting persistent socket id by Zakay · Pull Request #15 · phpredis/phpredis · GitHub
[go: up one dir, main page]

Skip to content

Support for setting persistent socket id #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 12, 2011
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated readme with new persistent_id information on pconnect
  • Loading branch information
Zakay committed Feb 4, 2011
commit 0aa69e7a2967d55cf7a47c3b7f6a722d28fdc116
8 changes: 5 additions & 3 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ So be patient on to many open FD's (specially on redis server side) when using p
connections on many servers connecting to one redis server.

Also more than one persistent connection can be made identified by either host + port + timeout
or unix socket + timeout.
or host + persistent_id or unix socket + timeout.

This feature is not available in threaded versions. `pconnect` and `popen` then working like their non
persistent equivalents.
Expand All @@ -118,6 +118,7 @@ persistent equivalents.
*host*: string. can be a host, or the path to a unix domain socket
*port*: int, optional
*timeout*: float, value in seconds (optional, default is 0 meaning unlimited)
*persistent_id*: string. identity for the requested persistent connection

##### *Return Value*

Expand All @@ -128,8 +129,9 @@ persistent equivalents.
<pre>
$redis->pconnect('127.0.0.1', 6379);
$redis->pconnect('127.0.0.1'); // port 6379 by default - same connection like before.
$redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout and would be another connection then the two before.
$redis->pconnect('/tmp/redis.sock'); // unix domain socket - would be another connection then the three before.
$redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout and would be another connection than the two before.
$redis->pconnect('127.0.0.1', 6379, 2.5, 'x'); // x is sent as persistent_id and would be another connection the the three before.
$redis->pconnect('/tmp/redis.sock'); // unix domain socket - would be another connection than the four before.
</pre>

## close
Expand Down
0