Laya_XS 1.客户端bin目录下添加socket.io.js
2.inddex.html引入
(https://github.com/socketio/socket.io-client/tree/master/dist)
3.在src目录下添加ts接口文件 socket.io-client.d.ts
(https://github.com/DefinitelyTyped/DefinitelyTyped/tree/2d4c4679bc2b509f27435a4f9da5e2de11258571/socket.io-client)
4.在需要使用的类中调用io.connect
我现在是这4部操作,不知道是否正确,现在出现
TypeError: Cannot create property 'path' on number '10000'
at new r (file:///Users/bingbing/MahjongProject/MahjongLaya/bin/socket.io.js:1:15053)