Skip to content
WebSocket emulation - Erlang server
Find file
Pull request Compare This branch is even with sockjs:cowboy-no-node-hack.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Erlang-based server side component for SockJS. See:

for more information on SockJS.

Currently this is somewhat limited:

  • Requires Misultin
  • A couple of header-based things haven't been ported from the node server
  • Hasn't been tested much
  • Hasn't been performance-tested at all

Hopefully in future some of these restrictions will get improved.

Some useful application configuration parameters:

  • sockjs_url - path to the sockjs library as seen by the client
    • default: "/lib/sockjs.js"
  • heartbeat_ms - milliseconds between heartbeat frames
    • default: 25000
  • session_close_ms - milliseconds to keep a session alive after a client connection goes away
    • default: 5000
  • json_impl - JSON library to use, mochijson2 or eep0018
    • default: mochijson2

[Note that the tests test that you can send unicode strings containing \0. When using eep0018 you can't; it strips them out. So a few tests will fail.]

Something went wrong with that request. Please try again.