ecorm / cppwamp

C++ client library for the WAMP protocol.
Boost Software License 1.0
35 stars 9 forks source link

Use adapters for statically-typed slots #51

Closed ecorm closed 9 years ago

ecorm commented 9 years ago

Instead of complicating the Session API with dynamic/static variants of Session::subscribe and Session::enroll, simply provide an adapter functor which wraps a static slot and performs dynamic argument demarshalling.

Example:

session->subscribe(Topic("foo"), staticSlot(&myCallHandler), yield);