sample() update existing samples to 6.0.0

This commit is contained in:
Kamil Myśliwiec
2019-01-15 00:02:34 +01:00
parent 4f767080bf
commit b0de7ce6f3
183 changed files with 3592 additions and 95716 deletions

View File

@@ -1,27 +1,27 @@
<html>
<head>
<head>
<script src="socket.io.js"></script>
<script>
const socket = io('http://localhost:3000');
socket.on('connect', function () {
console.log('Connected');
const socket = io('http://localhost:3000');
socket.on('connect', function() {
console.log('Connected');
socket.emit('events', { test: 'test' });
socket.emit('identity', 0, (response) => console.log('Identity:', response));
});
socket.on('events', function (data) {
console.log('event', data);
});
socket.on('exception', function (data) {
console.log('event', data);
});
socket.on('disconnect', function () {
console.log('Disconnected');
});
socket.emit('events', { test: 'test' });
socket.emit('identity', 0, response =>
console.log('Identity:', response),
);
});
socket.on('events', function(data) {
console.log('event', data);
});
socket.on('exception', function(data) {
console.log('event', data);
});
socket.on('disconnect', function() {
console.log('Disconnected');
});
</script>
</head>
</head>
<body></body>
</html>
<body></body>
</html>