Sample of Socket.IO C++ Client.
This program provide result of command on native client's shell to web browser.
This program is explained in linked Japanese article.
Build socket.io-client-cpp
ref. https://github.com/socketio/socket.io-client-cpp/blob/master/INSTALL.md#with-cmake
# at workdir
$ git -b 3.0.0 clone --recurse-submodules https://github.com/socketio/socket.io-client-cpp.git
$ mkdir -p socket.io-client-cpp/build
$ cd socket.io-client-cpp/build
$ cmake ..
$ make
$ sudo make install
Build sample
# at workdir
$ git clone https://github.com/llamerada-jp/socket.io-cpp-client-sample.git
$ mkdir -p socket.io-cpp-client-sample/src/build
$ cd socket.io-cpp-client-sample/src/build
$ cmake -D SIO_DIR=<Socket.IO C++ Client dir> -D BOOST_ROOT=<Boost dir> ..
$ make
$ cd socket.io-cpp-client-sample
$ cd src
$ npm install
$ node index.js
$ cd socket.io-cpp-client-sample
$ cd src/build
$ ./client http://localhost:8000/ <Your pc's ID.>
Access to http://localhost:8000/ and input browser's ID. Input command (like 'ls') and push button. The results on C++ client are displayed.