Commit Graph

345 Commits

Author SHA1 Message Date
Pieter Noordhuis
ac13c9f095 Only copy relevant fields from callback ptr to avoid copying garbage 2010-11-01 10:13:05 +01:00
Pieter Noordhuis
a66ec18e80 Make push/shift functions for callbacks responsible for malloc/free 2010-11-01 10:10:03 +01:00
Pieter Noordhuis
e25db30f38 Run pending callbacks with NULL reply on error 2010-11-01 10:01:34 +01:00
Pieter Noordhuis
8b0fddcb02 Clarify redisAsyncDisconnect behavior in comments 2010-11-01 09:53:54 +01:00
Pieter Noordhuis
ad2456047e Process callbacks after reading 2010-11-01 09:53:34 +01:00
Pieter Noordhuis
c43256633c Cleanup function should remove read/write events 2010-11-01 09:53:18 +01:00
Pieter Noordhuis
437eea80fc Make error ptr accessible from async context 2010-11-01 09:52:17 +01:00
Pieter Noordhuis
4e3bd7893d Add support to lazily disconnect an asynchronous connection 2010-11-01 09:27:43 +01:00
Pieter Noordhuis
ae5a13f557 Regenerated Makefile dependencies 2010-10-31 21:22:07 +01:00
Pieter Noordhuis
0152f12807 Extracted code to support callbacks in an asynchronous context 2010-10-31 21:20:47 +01:00
Pieter Noordhuis
9c7c602cc9 exit(3) is defined in stdlib.h 2010-10-31 21:12:02 +01:00
Pieter Noordhuis
435e545dd2 Fix redisGetReply 2010-10-31 21:11:25 +01:00
Pieter Noordhuis
6042c569b1 Move include of stdio.h to hiredis.h for size_t 2010-10-31 17:25:20 +01:00
Pieter Noordhuis
1d4f16b571 Extract OOM killer to util.h 2010-10-31 17:21:49 +01:00
Pieter Noordhuis
154097445c Remove unused header file 2010-10-31 14:52:23 +01:00
Pieter Noordhuis
a0b9f04eaa Move stdarg.h include to the hiredis header file 2010-10-31 14:45:15 +01:00
Pieter Noordhuis
44a2d08b30 The reply object functions may not change the read tasks 2010-10-31 14:44:36 +01:00
Pieter Noordhuis
3f0394b8a9 Use a fixed size stack instead of a dynamic list for read tasks 2010-10-31 14:42:48 +01:00
Pieter Noordhuis
8a80b89232 Update example.c to work with current code 2010-10-31 12:57:32 +01:00
Pieter Noordhuis
f463734e91 Remove reply object functions from connect functions 2010-10-31 12:53:57 +01:00
Pieter Noordhuis
47e1f77149 Refactor internal function flow and add redisAppendCommand* family 2010-10-31 12:34:45 +01:00
Pieter Noordhuis
298e9325d7 First step in decoupling reply callbacks from internals 2010-10-31 10:56:24 +01:00
Pieter Noordhuis
a3a405bcba Format a command using an argument vector 2010-10-31 10:34:29 +01:00
Pieter Noordhuis
e95c9d4c5b Change redisFormatCommand to return the command in a char*
This allows users of the API to format a command without the need to
have all the sds functions included, only for free'ing the returned
wire-level command.
2010-10-30 20:38:29 +02:00
Pieter Noordhuis
bc5dcdbc85 Status replies should have type REDIS_REPLY_STATUS 2010-10-30 17:49:39 +02:00
Pieter Noordhuis
171b5a24d4 Drop dependency on sds.h for exposed API 2010-10-30 17:47:19 +02:00
Pieter Noordhuis
1e7f5ae6bd Rename struct 2010-10-30 16:36:08 +02:00
Pieter Noordhuis
0f745d1ac0 Run pending callbacks with NULL reply on redisDisconnect() 2010-10-19 21:26:06 +02:00
Pieter Noordhuis
bbe007a75a Test helper for creating a non-blocking connection 2010-10-19 21:24:30 +02:00
Pieter Noordhuis
e3067fe231 Actively disconnect on an error
This calls the disconnect callback, causing the registered event
handlers to be cleared. After this, the error callback will be called,
knowing that events will no longer be fired.
2010-10-19 21:24:30 +02:00
Pieter Noordhuis
947612865d Remove const qualifier from command callback in examples 2010-10-19 21:24:30 +02:00
Pieter Noordhuis
d4b4a9128e Revert e5dd32d8 that added the const qualifier for command callbacks 2010-10-19 21:24:30 +02:00
Pieter Noordhuis
c8d72f7c7a Style 2010-10-19 21:24:30 +02:00
Pieter Noordhuis
e245ab48ec Added header file and example for usage from libev 2010-10-19 21:24:24 +02:00
Pieter Noordhuis
206868de06 Make error callback argument const 2010-10-19 16:48:19 +02:00
Pieter Noordhuis
ba42ab2ef8 Revert privdata in context callbacks to being non-const 2010-10-19 14:19:51 +02:00
Pieter Noordhuis
f9596db90b Test callback sequence in non-blocking context 2010-10-18 16:27:52 +02:00
Pieter Noordhuis
e332a32b35 Change redisWriteBuffer to return OK on an empty buffer 2010-10-18 15:49:52 +02:00
Pieter Noordhuis
a68cb9686e Tests for context callbacks in non-blocking mode 2010-10-18 15:39:56 +02:00
Pieter Noordhuis
634314f386 Rearrange tests to isolated functions 2010-10-18 14:51:03 +02:00
Pieter Noordhuis
61ba85ce57 Move context callbacks into struct and make privdata const 2010-10-18 12:37:33 +02:00
Pieter Noordhuis
7496458c68 The QUIT commands returns OK on master 2010-10-18 12:01:17 +02:00
Pieter Noordhuis
8b8b7afef2 Change README to Markdown 2010-10-12 00:31:09 +02:00
Pieter Noordhuis
3dfacba4f7 Add comments for function prototypes in hiredis.h 2010-10-12 00:27:04 +02:00
Pieter Noordhuis
d89241e795 Include sys/types.h instead of a custom typedef 2010-10-11 18:34:32 +02:00
Pieter Noordhuis
a7acd97ad1 Move event_base code out of libevent.h
This removes the need to wrap an event_base pointer in the redisContext
struct and allows multiple connections to be used in a single
event_base. Also, use the *privdata argument to the provided callbacks
to curry the redisEvent struct around.
2010-10-11 18:33:15 +02:00
Nicolas Favre-Felix
135e9265ac Added event_base to libevent code. 2010-10-10 20:51:27 +02:00
Pieter Noordhuis
96510ce86a Factor out reusable include for libevent 2010-10-07 17:48:03 +02:00
Pieter Noordhuis
b60952f22a Disconnect before free'ing 2010-10-07 17:38:56 +02:00
Pieter Noordhuis
9cd3b03d84 Fire callback when the context is being disconnected by the user 2010-10-07 17:36:22 +02:00