diff --git a/web/client/src/lib/message.ts b/web/client/src/lib/message.ts index 00c5e00..e361fea 100644 --- a/web/client/src/lib/message.ts +++ b/web/client/src/lib/message.ts @@ -33,7 +33,7 @@ export const parseMessage = (data: ArrayBuffer): IMessage | null => { if (data.byteLength < 39) return null const meta = new Int8Array(data.slice(0, 39)) const version = meta[0] - if (version !== 1) return null + if (version !== 2) return null const type = meta[1] as MessageType if (!allMessageBytes.includes(type)) return null const id = new TextDecoder().decode(data.slice(2, 38)) diff --git a/web/message.go b/web/message.go index fa9a1dc..0300d6a 100644 --- a/web/message.go +++ b/web/message.go @@ -13,7 +13,7 @@ import ( // message: -// type: 0/1/2/3/4 +// type: 0/1/2/3/4/5 // messageFlow // version 1 byte + type 1 byte + id 36 byte + waitIntercept 1 byte + content left bytes @@ -25,7 +25,7 @@ import ( // messageMeta // version 1 byte + type 1 byte + content left bytes -const messageVersion = 1 +const messageVersion = 2 type messageType byte