Commit Graph

17 Commits

Author SHA1 Message Date
Martijn Otto 2c60151d31 Only allocate a message and its data when a consumer wants to and allow consumers to receive the individual parts 2016-06-23 14:42:50 +02:00
hoxnox 15fa529bfd Bugfix: add missing include guards 2016-04-06 17:49:39 +03:00
Martijn Otto 7a11c23f03 When a deferred handler is in error state, registering a finalize callback should also cause it to be called immediately 2015-06-12 16:48:25 +02:00
Martijn Otto fcc9522e16 Some bugfixes and performance enhancements 2015-04-30 14:18:18 +02:00
Emiel Bruijntjes 9653578d4a The Channel.get().onFinalize() function was called before the Channel.get().onSuccess() method, which is strange. This has been fixed. To fix this, we had to refactor the Deferred* into shared_ptrs 2014-09-02 10:32:55 +02:00
Emiel Bruijntjes aceac8b677 the finalize callback is now called as part of the deferred object destructor, this ensures that the finalize callback will always be called 2014-08-29 13:18:08 +02:00
Emiel Bruijntjes f39410039b added Channel::get() that allows one to retrieve a single message from the channel 2014-07-31 12:58:13 +02:00
Martijn Otto ca8a39ea45 Fix memory leak 2014-05-06 16:49:43 +02:00
Emiel Bruijntjes b13398b09d setTimeout function removed from connection handler, the finalize and error callbacks are called right away if installed on an object that already is in an error state 2014-04-15 13:18:32 +02:00
Emiel Bruijntjes 3b78247363 error callbacks get a const char *, no longer a std::string 2014-04-15 12:29:22 +02:00
Emiel Bruijntjes 301b8153e3 deferred objects are now correctly destructed + added extra checks so that no crashes occur when someone destructs a channel inside a callback function 2014-04-15 12:25:56 +02:00
Emiel Bruijntjes 921f24ae06 de-templified the deferred objects, to make them easier to understand for other programmers 2014-04-15 10:43:33 +02:00
Emiel Bruijntjes 7b20f46519 removed channel parameter from the callbacks, because this can easily be captured 2014-04-15 08:52:49 +02:00
Martijn Otto 1c0495378a Implemented deferred consumers and a setTimeout method on the connection handler for indicating immediate failures on deferred objects 2014-04-14 14:10:57 +02:00
Martijn Otto d2c17869e0 Moved the remaining methods over to deferred handlers 2014-04-10 12:51:04 +02:00
Martijn Otto e1b0e3dea1 Added a generic callback class that acts as a container for the different types of callbacks 2014-04-08 16:12:04 +02:00
Martijn Otto 2939272bc8 Work in progress to convert channel handler to callback system 2014-04-08 14:42:07 +02:00