There are two different backends for socket.io on erlang, Yurii Rashkovskii's socket.io-erlang (https://github.com/yrashk/socket.io-erlang) and Yongboy's erlang-socketio (https://code.google.com/p/erlang-scoketio/).
Yurii seems to have a disagreement with the path taken by socket.io's post-0.6.x releases, and so the library supports only up to Version 0.6 of the spec. Naturally, most of the examples in this book and many other examples on the Internet, won't work over it.
Yongboy's erlang-socketio seems to be keeping itself up to date with the latest happenings in socket.io and is compatible with the latest spec for socket.io-1.0 at the time of writing. Thus we will focus the rest of this section on this library.
This library is available for
Cowboy and Mochiweb
, two popular server-side frameworks in erlang. Both these versions support socket.io spec 1.0. The Cowboy version supports all the transports, while the Mochiweb version is limited to xhr-polling
, htmlfile
, and json-polling
.