Skip to content

rafzi/WAMP_POCO

Repository files navigation

Autobahn|Cpp

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 of boost::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:

Building

Build tools

Install some libs and build tools:

sudo apt-get install libbz2-dev libssl-dev ruby libtool autoconf scons

clang

Install clang and libc++:

sudo apt-get install clang-3.4 libc++1 libc++-dev

Boost

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++"

Add the following to $HOME/.profile

export LD_LIBRARY_PATH=${HOME}/boost_1_55_0/stage/lib:${LD_LIBRARY_PATH}

MsgPack-C

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}

Autobahn|Cpp

Finally, to build Autobahn|Cpp

source $HOME/.profile
cd $HOME
git clone [email protected]:tavendo/AutobahnCpp.git
cd AutobahnCpp
scons

Futures

Closures Cheetsheet

  • [] 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 variable foo by reference
  • [bar] Capture bar by making a copy; don't copy anything else
  • [this] Capture the this pointer of the enclosing class

About

WAMP for C++ 11 on POCO

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 91.1%
  • Python 8.1%
  • CMake 0.8%