你好
我有个问题 !!!
当io连接到服务器时,
服务器反复登录:
像这样:
新客户端已连接
客户端断开连接
新客户端已连接
客户端断开连接
客户端断开连接
新客户端已连接
客户端断开连接
新客户端已连接
新客户端已连接
客户端断开连接
客户端断开连接
新客户端已连接
新客户端已连接
客户端断开连接
新客户端已连接
客户端断开连接
新客户端已连接
客户端断开连接
新客户端已连接
客户端断开连接
客户端断开连接
新客户端已连接
客户端断开连接
新客户端已连接
新客户端已连接
客户端断开连接
客户端断开连接
客户端断开连接
客户端断开连接
客户端断开连接
客户端断开连接
服务器代码:
io.origins('*:*');
io.on('connection', (socket) => {
console.log('New client connected');
socket.on('disconnect', () => {
console.log('Client disconnected');
});
});
客户代码:
import io from 'socket.io-client';
const socket = io.connect('http://192.168.1.34:3000');
我的代码有什么问题???
请帮我
我也有这个问题
安装插座。 [email protected]
最有用的评论
安装插座。 [email protected]