Tor  0.4.4.0-alpha-dev
pubsub Directory Reference

lib/pubsub: Publish-subscribe message passing.

More...

Files

file  pub_binding_st.h [code]
 Declaration of pub_binding_t.
 
file  pubsub.h [code]
 Header for OO publish-subscribe functionality.
 
file  pubsub_build.c [code]
 Construct a dispatch_t in safer, more OO way.
 
file  pubsub_build.h [code]
 Header used for constructing the OO publish-subscribe facility.
 
file  pubsub_builder_st.h [code]
 private structures used for configuring dispatchers and messages.
 
file  pubsub_check.c [code]
 Enforce various requirements on a pubsub_builder.
 
file  pubsub_connect.h [code]
 Header for functions that add relationships to a pubsub builder.
 
file  pubsub_flags.h [code]
 Flags that can be set on publish/subscribe messages.
 
file  pubsub_macros.h [code]
 Macros to help with the publish/subscribe dispatch API.
 
file  pubsub_publish.c [code]
 Header for functions to publish using a pub_binding_t.
 
file  pubsub_publish.h [code]
 Header for pubsub_publish.c.
 

Detailed Description

lib/pubsub: Publish-subscribe message passing.

This module wraps the lib/dispatch module, to provide a more ergonomic and type-safe approach to message passing.

In general, we favor this mechanism for cases where higher-level modules need to be notified when something happens in lower-level modules. (The alternative would be calling up from the lower-level modules, which would be error-prone; or maintaining lists of function-pointers, which would be clumsy and tend to complicate the call graph.)

See pubsub.c for more information.