zhoushihao
2024-07-25 78311acaaf04aab09f400a5c958c9d6cbc2b4aae
UI-Project/src/utils/WebSocketService.js
@@ -1,7 +1,7 @@
// WebSocketService.js
let socket = null;
let messages = '';
let messages='' ;
export const initializeWebSocket = (socketUrl, messageHandler) => {
    if (typeof WebSocket === "undefined") {
      console.log("Your browser does not support WebSocket");
@@ -18,7 +18,6 @@
      if (!msg.data) {
        return;
      }
      const isLastChunk = msg.data.endsWith('<END>');
      //是否为最后一块消息
      messages += msg.data;