problem description:
< hr >
Code javascript script code is as follows
onLoad() {
let self = this
//
if (cc.sys.isNative) {
window.io = SocketIO
} else {
// socket.io.js
require("socket.io")
}
let socket = io("ws://localhost:3000")
socket.on("connected", (msg) => {
console.log("..")
})
socket.emit("data", "dagger")
}