This is a client for the Websocket protocol (IETF RFC6455) for the Twisted framework.

See http://tools.ietf.org/html/rfc6455 for the specifications of the protocol.


Trial (Twisted unit testing suite)

The trial tests require a version of txwebsocket that can be found at: https://github.com/aprilmay/txWebSocket.

Run them with: trial test_websocket_client


The Autobahn test suite is used as third party reference point. These tests are also more functional than the Trial based ones.

  1. Get and install Autobahn (http://www.tavendo.de/autobahn/testsuite.html)

  2. Start the Autobahn test suite server (fuzzing_server.py is located in the source of Autobahn, in the testsuite/websockets directory):

    python fuzzing_server.py
  3. Run:

    • a specific test case (1):

      python ./autobahn_test_client.py -c1
    • a bunch of tests (16) starting at (1):

      python ./autobahn_test_client.py -c1 -n 16
    • complete test suite:

      python ./autobahn_test_client.py -a
    • update the report:

      python ./autobahn_test_client.py -u
    • a quick help:

      python ./autobahn_test_client.py -h
  4. Check the report at http://localhost:9090/reports/clients/index.html

NOTE: Currently the tests that should handle UTF-8 decoding errors are failing.


TODO: Refer to the autobahn_test_client.py for a sample usage.

Many thanks

  • to Rlotun and the other contributors for the txWebsocket server (http://github.com/rlotun/txWebSocket)
  • to Tobias Oberstein (Tavendo GmbH) for the Autobahn test suite
  • to milutz for wss/TLS bug report and fix
  • to the many people contributing to the Twisted framework
  • to the many people contributing to the Python language
  • to the many people who have contributed to the definition of the Websocket protocol
  • anyone who will contribute to the improvement of this software :)


  • Additional testing for the UTF-8 decoding
  • Extensions/subprotocols


This software is released under the same terms than the Twisted license. See the LICENSE file distributed with this software.