Reputation: 115
Hi I need a websocket server in python which supports the protocol used in chrome 16(protocol version 13). Tornado and twisted are not working. Websockify works but i can't find any documentation for it. I need minimal setup means lesser imports. Please help me out here thanks in advance.
Upvotes: 8
Views: 4900
Reputation: 73119
If you are still interested in using websockify, there is a simple example of using it to build an echo server included](https://github.com/kanaka/websockify/blob/master/tests/echo.py).
You can run it like this (from a websockify checkout):
./tests/echo.py 8080
The browse to localhost:8080/tests/echo.html. Enter localhost, 8080 for the WebSocket host and port and hit connect. You should see the client sending messages and the server echoing them back (with a "You said: " prefix).
Upvotes: 0
Reputation: 414205
WebSocket Echo example works on Chrome/16.0.912.63.
It uses txWS
a simple library for adding WebSockets server support to your favorite Twisted applications.
Upvotes: 0
Reputation: 1333
This page contains an implementation of a Python websocket server that can be used through imports:
https://github.com/AdrianGaudebert/python-websocket-server
You should know that the license for using this is MIT. It may only work with Python 3.0.
Upvotes: 0
Reputation: 1333
Here are some examples of implementing a websocket server in Python. Be sure to read and apply the comments on the code of the following examples, because there may be some bugs:
http://popdevelop.com/2010/03/a-minimal-python-websocket-server/ : It has been tested on Chrome, according to the author of the code.
http://mumrah.net/websockets-in-python : At the end of this blog page, the author has included the URL to a Python implementation of a websocket server.
http://dev.enekoalonso.com/2010/05/22/more-websockets-now-with-python/: only works on Chrome, according to the author.
Upvotes: 0
Reputation: 80761
Maybe you could take a look to pywebsocket, it claims to support protocol version 13 and is designed for :
The pywebsocket project aims to provide a WebSocket standalone server and a WebSocket extension for Apache HTTP Server, mod_pywebsocket.
Autobahn is another implementation of websockets :
Autobahn WebSockets for Python provides an implementation of the WebSockets protocol which can be used to build WebSockets clients and servers
ws4py : Websocket for python :
Python library providing support for the WebSocket protocol defined in RFC 6455
Upvotes: 5