Commit cda869e0 authored by 邱旭's avatar 邱旭

联机初版,代码未整理

parent ff82fcf6
......@@ -199,7 +199,7 @@ function broadcastOnlineCount() {
*/
function broadcastJson(data) {
const msg = JSON.stringify(data);
server.connections.forEach(function (conn) {
server.connections.forEach((conn) => {
conn.sendText(msg);
});
}
......@@ -219,7 +219,7 @@ function sendJson(conn, data) {
* @param {string} msg
*/
function broadcast(msg) {
server.connections.forEach(function (conn) {
server.connections.forEach((conn) => {
conn.sendText(msg);
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment