美文网首页
socket.io有一坑

socket.io有一坑

作者: 马克_唐卡 | 来源:发表于2019-01-07 20:38 被阅读0次

先上官网描述:Socket.IO is NOT a WebSocket implementation. Although Socket.IO indeed uses WebSocket as a transport when possible, it adds some metadata to each packet: the packet type, the namespace and the ack id when a message acknowledgement is needed. That is why a WebSocket client will not be able to successfully connect to a Socket.IO server, and a Socket.IO client will not be able to connect to a WebSocket server either. Please see the protocol specification here.

对,如果服务端和客户端不是同时使用socket.io实现对话,就不能用!

相关文章

网友评论

      本文标题:socket.io有一坑

      本文链接:https://www.haomeiwen.com/subject/prmprqtx.html