html5 新增的api websocket 能否设置证书的认证?
看到 node 里面有类似概念,想要请问一下html5里面是否有此概念,在MDN中只看到url及protocol的设置。
然后还想请问一下html5中的websocket和node里面的websocket有什么不同之处,概念比较模糊。
望解惑,谢谢
html5的websocket api是前端处理websocket请求和响应的,本身没有服务构建功能,不需要设置证书。简单地说,html5通过websocket协议和后端交互,但是html5本身是没有websocket的,那个只是使用websocket的接口,不是websocket本身。而node的websocket,指的是构建服务