Add Contributing section to README
Allowing multiple handlers through a hack
This now works using gproc instead of list_to_atom. This is done using gproc and adds a dependency, warranting a version bump from 1 to 1.1
This is done by using dynamic atoms (a bad thing) based on the number of ports you have a connection on. A good design would have required a substantial rewrite of the application. However, to simply get things working in a decent way, although not perfect in terms of patterns, I decided to go this way. It is worth the time for an application in maintenance -- no technical debt on this one, unless someone else wants to take control.
We will keep socket.io-erlang compatible with socket.io v0.6, and as such will stop adding new features. We will still fix bugs and issues, though.
This commit upgrades the current agnerized version being used by the Makefile. This prompted changes to the rebar config. The true build problems were caused by the merge #63, which added a fix to the -include_lib path to better work with release. However, this introduced a problem when compiling with rebar given rebar calls 'erlc', which ignores all ERL_LIBS options and thus will only support the default system libs (apparently). This commit adds a macro definition to rebar.config and a preprocessor switch to the socketio_listener module (which had the include_lib changed) so that when compiled from rebar, we use the old code that worked, and when going without rebar, we use the fix that existed. Hopefully that will make everyone happy.
…king care of this now)
Rebar post_hooks for git submodules (and a minor tweak)
…emoving socket.io client code via git submodule
Fix some annoying compiler warnings when running demo escripts
The previous fix would mess up some escaping in different circumstances. This commit should get rid of the problems by adding smarter escaping.
Stable jsx version
This branch fixes the jsx version to 0.9.0 to avoid the currently changing API of the app.
Fixing issue 57
By using JSX's format function and proper encoding/decoding the number of slashes is reduced to something reasonable that seems to work across the board.
Updated submodule to work with new socket.io git layout
Fix to bug #50 (Second try)
Changing the way timers work
We fix the timer issues having to do with erlang BIF timers conflicting with the connection timeouts occurring after a closed socket. Any client whose connection is closed at the point where the 'dead connection timeout' is longer than the polling/heartbeat timer's time left will have conflicting timers where the polling/heartbeat resets the dead connection timeout. Given the delays between the 'dead connection timeout' and the regular polling/heartbeat timeout can be very close (and are set that way by default), this conflict happens fairly often. Because we are not exactly sure what makes it valid to cancel the dead connection timer, this fix makes it so both timers are handled the same way, replicating the old behaviour present before the recent fixes to the timers when it comes to these connections.
More timers and heartbeats fixed, including htmlfile and xhr multipart. Nothing in the tests seemed to have an influence on the htmlfile transport. Further tests ought to be added in time. Note that as for the other transport, the timeout on a disconnection is still not a BIF, compared to the heartbeats which now use the Erlang timer functions.
The current way of handling timeouts is risky with regards to user calls able to mess with the timeouts and get things out of sync with the client side. This fix replaces the timeouts coming from the gen_server behaviour with the erlang timer BIFs, likely safer and independent of the messages received. The timeouts having to do with a connection being closed are still handled the old way.
The current way of doing timers in websockets is fickle and bound to error when it is reset on all messages we get. Just by sending a process random messages, the timers get reset all the time. This fix adds a different way of handling timers by using the erlang module's start_timer/3 and cancel_timer/1 to get a safer timeout/heartbeat behaviour.
Also fixing an error message when the value can't be retrieved.
Missing application environment entry (close_timout) added
When trying to start the socketio_listener more than once, we crash the application. This patch makes it so we always return the Pid if the initial process was already started, to deal with the issue transparently.