Files
arduinoWebSockets/tests/webSocket.html
Markus Sattler cf3ca5fde2 fix #6
Firefox send more then Upgrade in Connection header
2015-07-15 10:09:07 +02:00

30 lines
571 B
HTML

<html>
<head>
<script>
var connection = new WebSocket('ws://10.11.2.2:81/test', ['arduino']);
connection.onopen = function () {
connection.send('Message from Browser to ESP8266 yay its Working!! ' + new Date());
connection.send('ping');
};
connection.onerror = function (error) {
console.log('WebSocket Error ', error);
};
connection.onmessage = function (e) {
console.log('Server: ', e.data);
};
setInterval(function() {
connection.send('Time: ' + new Date());
}, 1000);
</script>
</head>
<body>
Test Websocket.
</body>
</html>