0
我的nodejs服务器上有一个与socket.io相关的问题。问题与socket.io相关,IOS8 +中的IOS移动浏览器无法正常工作。我已经搜索过它,并通过一些解决方案,但没有任何工作。 这里有问题的链接:
https://github.com/Automattic/socket.io/issues/976
http://www.codedisqus.com/7yzSqUgqge/socketio-working-on-desktop-safari-chrome-but-not-mobile.htmlNodejs Socket.io在桌面Safari和Chrome上工作,但不是iPhone
下面是代码
io.sockets.on('connection', function(socket) { process.emit('client-connection', socket.id); socket.on('authenticate', function(message) { console.log('Authenticating client with key "' + message.authToken + '"'); authenticateClient(socket, message); }); socket.on('message', function(message) { if (io.sockets.sockets[socket.id] && message.hasOwnProperty('type')) { if (message.hasOwnProperty('channel')) { if (settings.clientsCanWriteToChannels || ChannelIsClientWritable(message.channel)) { process.emit('client-message', socket.id, message); } } return; } }); socket.on('disconnect', function() { console.log("in disconnect"); process.emit('client-disconnect', socket.id); cleanupSocket(socket); }); })
请让我知道。
基本问题是,当我尝试在浏览器上打开会话时,它工作正常,如果我尝试在iPhone设备浏览器上执行相同的操作,则无法正常工作。