Created
June 20, 2017 04:50
-
-
Save alexcastillo/e3aca7ba0a3510a4c340b34faeb6d54c to your computer and use it in GitHub Desktop.
Socket.io client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Socket.io Client</title> | |
<base href="/"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script src="//cdn.jsdelivr.net/socket.io-client/1.3.2/socket.io.js" /> | |
<script> | |
var socket = io('http://0.0.0.0:0000'); // ip of wifi shield and port of socket | |
socket.on('data', function (data) { | |
console.log(data); | |
}); | |
</script> | |
</head> | |
<body> | |
Check the console | |
</body> | |
</html> |
needed to add a end script tag on <script src="//cdn.jsdelivr.net/socket.io-client/1.3.2/socket.io.js" />
Are you serving this from the file system or a web server?
Also, can you share your Arduino server request/response headers?
Do i need to do HTTP header validation?
the websocket server is on port 81
not port 80
on the Wifi Shield, i have been trying to hit 81
. need to get back on my wifi to test this but i have feeling that was the problem.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is the error i'm getting: