j2labs/brubeck — pull request #98 by fleephub (2012-12-10 13:04:43+00:00)
Title: Websockets echo demo over Brubeck

In connections.py
- Removed many unneccessary imports (ujson should also be removed
- From connection class removed lots of stuff that was left hanging
there after wsgi support was added. Seems that there are only
two shared methods in current implementation and all the rest of
the code was just complicating code and creating confusion
- Did some cleanup in Mongrel2Connection but there is probably
more room to make it consisten and nice to use
- Removed hardcoding for only http responses from process_message
so now it can be used also for websocket responses

In request_handling.py
- Removed some unneccessary imports
- Removed uncommented and unneccessary function render() from module level.
All calls to this replaced with appropriate http_response calls
Also cleaned up ungly cross importing between modules that was in the way
for websockets

In m2reader.py
- Set connect string to match mongrel2 conf in demos dir.

In demo_websocket.py
- Quite simplistic impleetation of websockets echo server.
I plan to write decent support but i would like to get the
fixed common code first incorporated into brubeck