Closed Jollyfant closed 2 years ago
In JavaScript:
<script>
// Create WebSocket connection.
const socket = new WebSocket('ws://localhost:8765');
// Connection opened (sending does nothing)
socket.addEventListener('open', function (event) {
socket.send('Ping');
});
// Listen for messages
socket.addEventListener('message', function (event) {
console.log(event.data);
});
</script>
See #4
Shoul add a Python Websocket Server to broadcast data to HTML5 clients for the dashboard