8000 Merge branch 'master' into pecl. · jrtkcoder/phpredis@9b6af7b · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b6af7b

Browse files
committed
Merge branch 'master' into pecl.
2 parents 23f25ce + 265feef commit 9b6af7b

File tree

8 files changed

+219
-235
lines changed

8 files changed

+219
-235
lines changed

COPYING

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
--------------------------------------------------------------------
2+
The PHP License, version 3.01
3+
Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
4+
-------------------------------------------------- 8000 ------------------
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, is permitted provided that the following conditions
8+
are met:
9+
10+
1. Redistributions of source code must retain the above copyright
11+
notice, this list of conditions and the following disclaimer.
12+
13+
2. Redistributions in binary form must reproduce the above copyright
14+
notice, this list of conditions and the following disclaimer in
15+
the documentation and/or other materials provided with the
16+
distribution.
17+
18+
3. The name "PHP" must not be used to endorse or promote products
19+
derived from this software without prior written permission. For
20+
written permission, please contact group@php.net.
21+
22+
4. Products derived from this software may not be called "PHP", nor
23+
may "PHP" appear in their name, without prior written permission
24+
from group@php.net. You may indicate that your software works in
25+
conjunction with PHP by saying "Foo for PHP" instead of calling
26+
it "PHP Foo" or "phpfoo"
27+
28+
5. The PHP Group may publish revised and/or new versions of the
29+
license from time to time. Each version will be given a
30+
distinguishing version number.
31+
Once covered code has been published under a particular version
32+
of the license, you may always continue to use it under the terms
33+
of that version. You may also choose to use such covered code
34+
under the terms of any subsequent version of the license
35+
published by the PHP Group. No one other than the PHP Group has
36+
the right to modify the terms applicable to covered code created
37+
under this License.
38+
39+
6. Redistributions of any form whatsoever must retain the following
40+
acknowledgment:
41+
"This product includes PHP software, freely available from
42+
<http://www.php.net/software/>".
43+
44+
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
45+
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
46+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
47+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
48+
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
49+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
50+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
51+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
53+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
54+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
55+
OF THE POSSIBILITY OF SUCH DAMAGE.
56+
57+
--------------------------------------------------------------------
58+
59+
This software consists of voluntary contributions made by many
60+
individuals on behalf of the PHP Group.
61+
62+
The PHP Group can be contacted via Email at group@php.net.
63+
64+
For more information on the PHP Group and the PHP project,
65+
please see <http://www.php.net>.
66+
67+
PHP includes the Zend Engine, freely available at
68+
<http://www.zend.com>.

README.markdown

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PhpRedis
22
=============
3-
The phpredis extension provides an API for communicating with the [Redis](http://redis.io/) key-value store.
3+
The phpredis extension provides an API for communicating with the [Redis](http://redis.io/) key-value store. It is released under the [PHP License, version 3.01](http://www.php.net/license/3_01.txt).
44
This code has been developed and maintained by Owlient from November 2009 to March 2011.
55

66
You can send comments, patches, questions [here on github](https://github.com/nicolasff/phpredis/issues) or to n.favrefelix@gmail.com ([@yowgi](http://twitter.com/yowgi)).
@@ -115,7 +115,7 @@ So be patient on to many open FD's (specially on redis server side) when using p
115115
connections on many servers connecting to one redis server.
116116

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

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

129130
##### *Return Value*
130131

@@ -135,8 +136,9 @@ persistent equivalents.
135136
<pre>
136137
$redis->pconnect('127.0.0.1', 6379);
137138
$redis->pconnect('127.0.0.1'); // port 6379 by default - same connection like before.
138-
$redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout and would be another connection then the two before.
139-
$redis->pconnect('/tmp/redis.sock'); // unix domain socket - would be another connection then the three before.
139+
$redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout and would be another connection than the two before.
140+
$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.
141+
$redis->pconnect('/tmp/redis.sock'); // unix domain socket - would be another connection than the four before.
140142
</pre>
141143

142144
## close

common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ typedef struct {
147147
int failed;
148148
int status;
149149
int persistent;
150+
char *persistent_id;
150151

151152
int serializer;
152153

0 commit comments

Comments
 (0)
0