CARVIEW |
boothead / rpz.websocket
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
click here to add a description
click here to add a homepage
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Wed May 19 22:23:56 -0700 2010 | Include all of docs/_build in .gitignore [boothead] |
![]() |
README.rst | Wed May 19 23:14:32 -0700 2010 | Fleshed out the docs [boothead] |
![]() |
bootstrap.py | Mon May 10 23:32:01 -0700 2010 | Initial port from multivisor [boothead] |
![]() |
buildout.cfg | Tue Jun 08 23:01:41 -0700 2010 | Removed repoze from ediatables (svn was down) a... [boothead] |
![]() |
dev.cfg | Wed May 19 22:06:27 -0700 2010 | Rollback some earlier changes and get rid of th... [boothead] |
![]() |
docs/ | Sun May 23 23:22:07 -0700 2010 | Factored out the handshake logic to its own module [boothead] |
![]() |
rpz/ | Tue Jun 08 23:00:41 -0700 2010 | Fixed a bug with the ListenerDescriptor [boothead] |
![]() |
setup.py | Thu May 13 23:07:50 -0700 2010 | Add xunit to tests [boothead] |
![]() |
tests/ | Tue Jun 08 23:00:41 -0700 2010 | Fixed a bug with the ListenerDescriptor [boothead] |
Introduction
rpz.websocket is a package for adding WebSockets support to repoze.bfg applications using the excellent eventlet library for long running connections
What is a WebSocket?
From wikipedia:
WebSockets is a technology providing for bi-directional, full-duplex communications channels, over a single TCP socket
The WebSocket protocol provides a persistent low latency, low complexity way to achieve two way communication from the browser to server.
From a client point of view using websocket is very simple:
var ws = new WebSocket('ws://somehost/some/url'); ws.onopen = function(msg){ //do some cool setup } ws.onmessage = function(msg){ //do something cool } ws.onclose = function(msg){ //do some clean up... stay cool } // later: ws.send('How cool am I?!');
That's pretty much all there is to it.
Normally the websocket communication in a web app is implemented as a stand alone server (perhaps running on a different port). rpz.websocket allows you to connect persistent connection directly to the same objects that serve your HTML.
Documentation
Note
Still under construction
Documentation is maintained at https://boothead.github.com/rpz.websocket
References
[WebSockets] | https://en.wikipedia.org/wiki/Web_Sockets |
[spec] | https://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76 |