6 Commits

Author SHA1 Message Date
michael-grunder 2c5ef19257 Introduce new RedisCmd based command construction
* Introduce a new `RedisCmd` struct to dynamically append RESP arguments
  such that we don't have to precalculate the number of arguments the
  command will have up front.

  Additionally the new `RedisCmd allows both a `void *` context pointer
  but also can attach a `void (*ctx_dtor)(void*)` destructor so we are
  still able to clean up any allocated context when commands fail.

  This moves the context cleanup out of every individual reply handler
  and into the generic processing wrappers.

* Create a small group of `resp_str` helper functions for lower level
  concatination of RESP protocol data over the wire.

* Lots of small modernization of the codebase such as using
  `zend_string*` instead of (`char *`, `size_t`) pairs.

* Greatly simplify `crosslot` handling logic
2026-06-04 12:16:35 -07:00
thomaston a3327d9d2b Fix bug: the pipeline mode socket return an unexpected result after reconnecting (#2358)
* fix bug: the pipeline mode socket return an unexpected result after reconnecting

* fix typos: pipeline is right

---------

Co-authored-by: marcofu <marcofu@tencent.com>
2023-07-20 11:48:53 -07:00
Michael Grunder e61ee1da45 Normalize Redis callback prototypes and stop typecasting. (#1935) 2021-02-25 10:03:53 -08:00
Pavlo Yatsukhnenko d5dadaf635 Add PHPREDIS_GET_OBJECT and PHPREDIS_ZVAL_GET_OBJECT macros 2020-03-09 13:36:27 +02:00
Pavlo Yatsukhnenko 46da22b09b Fix memory leak and add copyright header 2020-02-06 14:14:46 -08:00
Pavlo Yatsukhnenko c94e28f1eb Add RedisSentinel class and tests 2020-02-06 14:14:46 -08:00