Age | Commit message (Collapse) | Author |
|
[Cleaned up:
- name of function: freeRedis... -> redisFree...
- return value of function (free doesn't return anything)
- parameter type for function.
- we don't need to free a char**, the char** is just
for returning from the assignment functoin.]
Closes #250
|
|
[This introduces some new API functions.]
* Adds new flag to the connection context indicating SO_REUSEADDR
should be set.
* Adds max number of retries constant for when connect() hits
EADDRNOTAVAIL.
* Adds new function, redisAsyncConnectBindWithReuse(), letting
clients enable this functionality.
[Removed trailing whitespace in new header lines.]
Closes #264
|
|
[It doesn't _actually_ matter, but technically
the order argument is: (number of items, size of items)]
Closes #279
|
|
OK, perhaps the second time is a charm. I forgot that I had
hiredis forked from a long time ago, so the initial pull
request was hosed. :)
* Pulled in sdscatfmt() from Redis, and modified it to accept a
size_t (%T) style format specifier.
* Pulled in sdsll2str() and sdsull2str() from Redis (needed by
sdscatfmt).
* Added a new method, redisFormatSdsCommandArgv() which takes
and sds* as the target, rather than char* (and uses sdscatfmt
instead of sprintf for the construction).
I get roughly the following improvement:
Old: 1.044806
New: 0.481620
The benchmark code itself can be found here:
https://gist.github.com/michael-grunder/c92ef31bb632b3d0ad81
Closes #260
|
|
Make redisFree() and freeReplyObject() less surprising by behaving just
like free(). That is, don't crash when passing in NULL.
|
|
|
|
SDS is now broken out of Redis into its own project, so include
the latest version from the SDS repo.
This is a backport of the Redis commit doing the same to the bundled hiredis:
https://github.com/antirez/redis/commit/320fa02b9b48ee1c63d88db6344fc0d328e24853
|
|
Closes #202
|
|
These allows for easier integration of hiredis with external
code that wants to manage its fds, say for instance in a pool.
Closes #223
|
|
Some environments require binding to specific source addresses instead
of letting the system determine which IP a connection should originate
from.
Closes #233
|
|
The struct timeval argument in redisConnectWithTimeout(),
redisConnectUnixWithTimeout(), redisSetTimeout(),
redisContextSetTimeout(), redisContextConnectTcp()
and redisContextConnectUnix() is never modified and can
therefore be marked as const.
Signed-off-by: Noah Williamsson <noah.williamsson@gmail.com>
|
|
|
|
constify: constify some variables / functions
|
|
Closes #121.
|
|
Make Connection KeepAlive being optional instead of default.
|
|
Prevent hiredis from crashing on memory allocation failure
|
|
Updated documentation and examples accordingly.
|
|
|
|
|
|
It was verified experimentally that this value, on Linux kernels, provides
better performances compared to the 2k value. However larger values
apparently don't produce any noticeable effect on performances.
|
|
Hiredis can handle multi bulk replies with a fixed (hardcoded) level of
nesting. This should be changed in the future in order to avoid
hardcoded limits. As a quick fix this commit moves the max nesting from 2
to 7, so that there are no problems when processing replies from the SLOWLOG
command, from Redis Sentinel, or generated by Redis Lua Scripts (that are
allowed to generate replies with any level of nesting).
|
|
Hiredis used to free unused redisReader buffers bigger than 16k. Now
this limit is configurable (see the documentation updated by this commit)
in order to allow working with big payloads without incurring to speed
penalty.
|
|
|
|
|
|
|
|
There is no way we can guess the width of the argument when we cannot
infer its type from the format specifier.
|
|
|
|
This reverts commit 77540aa31694aa1e14d41f60a0452e49a2fed86a. The change
in buffer strategy is too large to put in a minor release. It is put in
a separate branch in the meantime, so it can be refined and released
together with a minor version bump.
|
|
|
|
This is done by only truncating the read buffer once a full reply has
been read. The buffer is no longer truncated halfway through reading a
reply. In addition: pass offset/length of protocol and content via the
read tasks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|