Socket.io Cinder block

Hi,
Has anyone tryed to do a socket.io client in Cinder?
I saw this repo but it depends on boost.

I use the websocket Cinder-block but I have to communicate with a socket.io app now…
Should I make a socket.io-to-ws app as a solution?
Any alternative?

Thank you,
Bruce

Hi Bruce,

I used socketIO with
socketio/socket.io-client-cpp/
under windows. It works great ! I ported ofxSocketIO under windows.
I don’t share the code for moment because I have a lot of dependance of external source code for moment.
I shoud try to make a lib to simplify the use.
It’s not compliqued to migrate ofxSocketIO to libcinder.

Call me for more information if you want !

++

1 Like

Hi,
The SocketIO Cinder block is now working fine!
It has a nodejs test server in the echo_server folder.
It is Windows only for the moment.
If you use the template, SockIO: Basic, add these preprocessor WEBSOCKETPP_CPP11_RANDOM_DEVICE;WEBSOCKETPP_CPP11_TYPE_TRAITS;ASIO_STANDALONE;WEBSOCKETPP_CPP11_FUNCTIONAL;ASIO_HAS_STD_ARRAY;
I wish these was a way to add these in cinderblock.xml…
Thanks to @Colin Bouvry for his help.

I tried a few older websocket cinderblocks and found they didn’t quite work out of the box, so I built my own based off of websocket++'s tutorials.

It’s only been tested with VS2019 and Windows 10. The configurations are all saved as property sheets (.props) with User Macros, so it should be pretty easy to update it depending on your specific project’s folder structure and requirements.

1 Like