Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88763

(填个小坑)WebSocket.OPEN与ws.OPEN的不同

$
0
0

@1329046779 写道:

通过下面语句建立ws以后:
ws = new WebSocket('ws://' + WS_SERVER)
通过调试发现, 在Chrome浏览器中, ws.OPEN === 1, 而在Android中, ws.OPEN === undefined. 所以判断ws.readyState还是要用WebSocket.OPEN才行.
踩的坑刚填好

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88763

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>