Autobahn|Cpp is a subproject of Autobahn which provides a C++ WAMP implementation that is able to talk WAMP over stdio
pipes.
It implements version 2 of WAMP with the following roles:
- Caller
- Callee
- Publisher
- Subscriber
and depends on
- C++ 11 compiler
boost::any
boost::future
Note: While C++ 11 provides a
std::future
, that lacks continuations. Autobahn|Cpp makes use ofboost::future.then
for attaching continuations to futures as outlined in the proposal here. This feature will come to standard C++, but probably not before 2015:
Install some libs and build tools:
sudo apt-get install libbz2-dev libssl-dev ruby libtool autoconf scons
sudo apt-get install clang-3.4 libc++1 libc++-dev
Get the latest Boost from here. Then
cd $HOME
tar xvjf Downloads/boost_1_55_0.tar.bz2
cd boost_1_55_0/
./bootstrap.sh
./b2 toolset=clang cxxflags="-stdlib=libc++" linkflags="-stdlib=libc++"
Get Boost trunk by doing:
git clone --recursive [email protected]:boostorg/boost.git
svn co http://svn.boost.org/svn/boost/trunk boost-trunk
Add the following to $HOME/.profile
export LD_LIBRARY_PATH=${HOME}/boost_1_55_0/stage/lib:${LD_LIBRARY_PATH}
Get MsgPack-C and build with clang:
cd $HOME
git clone https://github.com/msgpack/msgpack-c.git
cd msgpack-c
./bootstrap
CXX=`which clang++` CC=`which clang` CXXFLAGS="-std=c++11 -stdlib=libc++" \
LDFLAGS="-stdlib=libc++" ./configure --prefix=$HOME/msgpack_clang
make
make install
Add the following to $HOME/.profile
export LD_LIBRARY_PATH=${HOME}/msgpack_clang/lib:${LD_LIBRARY_PATH}
Finally, to build Autobahn|Cpp
source $HOME/.profile
cd $HOME
git clone [email protected]:tavendo/AutobahnCpp.git
cd AutobahnCpp
scons
- C++17: I See a Monad in Your Future!
- Boost Thread
- Boost Issue: when_all
- Boost Issue. when_any
- Boost Issue: future fires twice
[]
Capture nothing (or, a scorched earth strategy?)[&]
Capture any referenced variable by reference[=]
Capture any referenced variable by making a copy[=, &foo]
Capture any referenced variable by making a copy, but capture variablefoo
by reference[bar]
Capturebar
by making a copy; don't copy anything else[this]
Capture the this pointer of the enclosing class