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:
authorPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2022-05-26 18:12:01 +0300
committerPavlo Yatsukhnenko <yatsukhnenko@gmail.com>2022-10-01 13:31:53 +0300
commit144b8b48e230f388e11cbb8cf322e290a278e17e (patch)
tree8ab8cb3b829d8c43f5f2155f7a303ea113468f0b /redis.c
parentdc9af5296bedef126d2fa7d5ce31181c2824ad94 (diff)
Issue #2106issue-2106
Diffstat (limited to 'redis.c')
-rw-r--r--redis.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/redis.c b/redis.c
index 8499d33e..bfb0f8fe 100644
--- a/redis.c
+++ b/redis.c
@@ -3227,6 +3227,15 @@ PHP_METHOD(Redis, getDBNum) {
}
}
+PHP_METHOD(Redis, getTransferredBytes) {
+ RedisSock *redis_sock;
+
+ if ((redis_sock = redis_sock_get_connected(INTERNAL_FUNCTION_PARAM_PASSTHRU)) == NULL) {
+ RETURN_FALSE;
+ }
+ RETURN_LONG(redis_sock->txBytes);
+}
+
/* {{{ proto Redis::getTimeout */
PHP_METHOD(Redis, getTimeout) {
RedisSock *redis_sock;