pythonasyncioeventletgeventlong-pollinglow-latencysocket-iosocketiosocketio-serverweb-serverwebsocket
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
341 B
16 lines
341 B
const io = require('socket.io-client')
|
|
const port = process.env.PORT || 5000;
|
|
|
|
const socket = io('http://localhost:' + port);
|
|
|
|
socket.on('connect', () => {
|
|
console.log(`connect ${socket.id}`);
|
|
});
|
|
|
|
socket.on('disconnect', () => {
|
|
console.log(`disconnect ${socket.id}`);
|
|
});
|
|
|
|
socket.on('hello', (a, b, c) => {
|
|
console.log(a, b, c);
|
|
});
|
|
|