Answers for "socket client .io"

6

socket.io

<script src="/socket.io/socket.io.js"></script>
<script>
  const socket = io();
</script>
Posted by: Guest on August-29-2020
2

socket io

const server = require('http').createServer();
const io = require('socket.io')(server);
io.on('connection', client => {
  client.on('event', data => { /* … */ });
  client.on('disconnect', () => { /* … */ });
});
server.listen(3000);
Posted by: Guest on March-23-2021

Browse Popular Code Answers by Language