File: README.md

package info (click to toggle)
python-autobahn 23.1.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,424 kB
  • sloc: python: 38,620; javascript: 2,705; makefile: 899; ansic: 373; sh: 63
file content (25 lines) | stat: -rw-r--r-- 852 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Using wxPython with Autobahn

This example shows how to use WebSocket communication within a wxPython based application.

![](screenshot.png)

The demo creates a small Window that you can move around, and while doing so, the demo will send out WebSocket messages with the new Window position.

The demo will also receive WebSocket messages, count the number of received messages and display that number in the Window.

The server side of the demo runs a simple WebSocket broadcast server that will simply broadcast any WebSocket message it receives to all currently connected clients.

For fun, the demo also includes a HTML client which you can use to listen for all broadcasted events.

## How to run

Start the server

	python server.py

Start the wxPython client

	python client.py

Start the Web client by opening `client.html` in your browser.