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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the websocket server is on port
81
not port80
on the Wifi Shield, i have been trying to hit81
. need to get back on my wifi to test this but i have feeling that was the problem.