公告
财富商城
积分规则
提问
发文
2019-06-11 22:21发布
对你真心纯属浪费
Can't connect to WebSocket inside Service Worker!
ws = new WebSocket("ws://46.101.***.***");
Response
(Opcode -1)
As shown in this GitHub issue on the W3C service worker repo, service workers do not support WebSocket.
I think you can create a web-socket connection inside a service worker. Or you can use web-workers here to maintain the websocket.
web-workers
最多设置5个标签!
As shown in this GitHub issue on the W3C service worker repo, service workers do not support WebSocket.
I think you can create a web-socket connection inside a service worker. Or you can use
web-workers
here to maintain the websocket.