xushiting 3 年之前
父節點
當前提交
86c6ff9b0c
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/Socket.js

+ 5 - 2
src/Socket.js

@@ -22,10 +22,13 @@ export default class Socket extends EventEmitter {
         }));
         E(this, "send", e=>{
             if (this.wsNoReady())
+            {
                 return;
+            }
             const t = JSON.stringify(e);
-            e.id !== "heartbeat" && logger.info("send ws frame", t),
-            this._ws.send(t)
+            e.id !== "heartbeat" && logger.info("send ws frame", t);
+            this._ws.send(t);
+            console.log('发送socket数据:'+t)
         }
         );
         E(this, "startGame", ()=>{