Websocket library for python

Hi, I need a websocket server in python that supports the protocol used in chrome 16 (protocol version 13). Tornadoes and twisted do not work. Websockify works, but I can not find any documentation for it. I need a minimal setup, this means less import. Please help me for this in advance.

+7
source share
5 answers
  • Perhaps you can take a look at pywebsocket , it claims to support version 13 protocol and is intended for:

    The pywebsocket project aims to provide a standalone WebSocket server and a WebSocket extension for the Apache HTTP server, mod_pywebsocket.

  • Autobahn is another implementation of websockets:

    Autobahn WebSockets for Python provides an implementation of the WebSockets protocol that can be used to create WebSockets clients and servers.

  • ws4py: Websocket for python :

    Python library supporting WebSocket protocol defined in RFC 6455

+5
source

Here are some examples of Python webmail server implementations. Be sure to read and apply comments to the code for the following examples, because there may be some errors:

0
source

This page contains an implementation of the Python web server server that can be used through import:

https://github.com/AdrianGaudebert/python-websocket-server

You should be aware that the license to use this is MIT. It can only work with Python 3.0.

0
source

If you are still interested in using websockify, there is a simple example of using it to create an echo server in the kit] (https://github.com/kanaka/websockify/blob/master/tests/echo.py).

You can run it like this (from websockify check):

 ./tests/echo.py 8080 

Go to localhost: 8080 / tests / echo.html. Enter localhost, 8080 for the host and WebSocket port and click connect. You should see how the client sends messages, and the server sends them back (with the prefix "You said:").

0
source

All Articles