]> git.ipfire.org Git - thirdparty/squid.git/commit - src/base/Subscription.h
Author: Alex Rousskov <rousskov@measurement-factory.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 7 Oct 2010 07:53:45 +0000 (20:53 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 7 Oct 2010 07:53:45 +0000 (20:53 +1300)
commit3cb19943bf9f142572737e679b7170874e5a0032
tree7b1ef20330130403879a6f177a6637a2c10a9102
parent01eb26fc5a3507443312a3c5e8c60f2ecbe1f4fb
Author: Alex Rousskov <rousskov@measurement-factory.com>
Author: Amos Jeffries <squid3@treenet.co.nz>
API for subscribing AsyncCall handlers to event producers

This API allows AsyncCall handlers to be subscribed for receiving multiple
event callbacks from producer/factory classes.

Intended use-cases include the main port listeners which are started once.
Run for a long time. And over their lifetime need to generate multiple
calls to any one of several handlers without having specific type details
hard-coded about the calls they are spawning.
 ie they cannot use "new X(y,z)" because they are not aware of y and z.
    Nor can one AsyncCall be scheduled and fired multiple times.

Other use-cases already sighted are UDP readers and event timers.
src/base/Makefile.am
src/base/Subscription.h [new file with mode: 0644]