python-websocketd
Python module for creating a http server which uses WebSockets.
|
This module can be used to create websockets servers and clients. A websocket client is an HTTP connection which uses the headers to initiate a protocol change. The server is a web server which serves web pages, and also responds to the protocol change headers that clients can use to set up a websocket.
Note that the server is not optimized for high traffic. If you need that, use something like Apache to handle all the other content and set up a virtual proxy to this server just for the websocket.
In addition to implementing the protocol, this module contains a simple system to use websockets for making remote procedure calls (RPC). This system allows the called procedures to be generators, so they can yield control to the main program and continue running when they need to. This system can also be used locally by using call().