Files
deb-python-autobahn/examples/twisted/websocket/ping
meejah 9b85b80f27 putChild() calls need bytes
To work properly on Python3, putChild() calls need bytes for their
URL fragments, as Twisted uses bytes for URIs.
2016-06-14 17:31:53 -06:00
..
2013-12-23 00:13:34 +01:00
2016-05-01 18:24:51 +03:00
2013-12-23 00:13:34 +01:00
2016-05-01 18:24:51 +03:00
2016-06-14 17:31:53 -06:00

WebSocket Ping Server and Client

This example runs a WebSocket server that pings any connected WebSocket client every second (via WebSocket Ping frames).

Included is a HTML and a Python client.

This example uses secure WebSocket (TLS).

Running

Run the server by doing

python server.py

and open

https://localhost:8080/

in your browser.

To run the Python client, do

python client.py wss://localhost:9000