ecorm / cppwamp

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

Provide scoped connections/registrations #45

Closed ecorm closed 9 years ago

ecorm commented 9 years ago

In some situations, the user may not want the burden of having to keeping Subscription/Registration objects "alive". Topic and Procedure should provide a .permanently() option which indicates that the subscription/registration will be valid for the lifetime of the Session object. This option would also make the Session object keep its own copy of the Subscription/Registration shared objects.

If this option is used, the user has to ensure that the callbacks can be called while the Session is established.

ecorm commented 9 years ago

Alternatively, a scheme similar to boost::signals2::scoped_connection could work.