Update

Favorited a note by xrevan86
@samir @chimo If it helps, that's how I adjusted it: https://paste.debian.net/1074976

I've installed the dependencies from the distribution's repository, so I had to adapt it for newer ReactPHP Socket and Ratchet.
I also found that the current approach isn't flexible when it comes to reverse proxying, so that's another change.

I wonder if maybe the URL path should rather be something like /main/_ws rather than just /_ws, to avoid collisions with usernames.