ecorm / cppwamp

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

Make it easier to register coroutine handlers #91

Closed ecorm closed 8 years ago

ecorm commented 8 years ago

Provide wrappers similar to basicRpc and basicEvent for handlers intended to be run as coroutines. For example:

session->enroll(Topic("sensor_updated"), basicCoroEvent<float>(
    [&](float value, boost::asio::yield_context yield)
    {
        session->call(Rpc("log_value").withArgs(value), yield);
    }