This single pd patch file contains a reusable and fully documented websocket server, meant as an easy way to experiment with Pd<->web-browsers communications through websockets, without the need of other software or any external to compile.
A demo is included in the same patch : 'Flames', a simple cross-browser, multi-touch and multi-player graphical interface which makes Pd play creepy sounds
and its javascript code for websockets is also documented.
Just try it : open it with Pd-extended 0.43.4 on Windows, Mac or Linux, fire any recent web-browsers (on same machine or other computer, smartphone or tablet on same local network) with the URL provided in the main window, and you're good to go !
Feel free to improve it and to let me know of eventual projects based on it.
(i've added a basic tutorial in a post below)
http://www.pdpatchrepo.info/hurleur/websocket-server-in-a-patch.pd