4 ms·
One of my own https://github.com/jebu/websockets https://github.com/jebu/websockets
by jebu 16y ago
One of my own https://github.com/jebu/websockets https://github.com/jebu/websockets
- metabrew 16y agoCool. There are a few disparate erlang implementation right now. Misultin has one, zotonic has one, I patched mochiweb to support websockets on the same port too: https://github.com/RJ/mochiweb https://github.com/RJ/mochiweb
- jebu 16y agoNice this started out as a fun implementation and now does transparent SSL and flash policy responses. Uses port forwarding to server on different ports.
- dylanz 16y agoDefinitely disparate, and it seems to be the case with the web frameworks as well. Going to check out Jebu's implementation. Have been using Misultin, which has been great thus far.
- cron 16y agoI'm also coding an Erlang websocket app. In my implementation a simple_one_for_one spawns a new gen_server when a connection is accepted. It looks a little prettier because all the spawning, sending and receiving is now handled by the OTP. I also use active sockets, but I'm a bit worried about flood protection, what's your strategy?
- jebu 16y agoI have the websocket server as a gen_server process which could be tied into an existing supervisor. Each connected client is an Erlang process a non gen-server one primarily because restarting a failed client is almost useless since the n/w connection cannot be reconnected. For flood prevention i use a simple concurrent connection counter and limit the max concurrent connections.