@colyseus/core
Advanced tools
Comparing version 0.16.0-preview.9 to 0.16.0-preview.10
@@ -73,3 +73,4 @@ var __defProp = Object.defineProperty; | ||
import_schema.encode.utf8Write(sendBuffer, serializerId, it); | ||
return Buffer.concat([sendBuffer.subarray(0, it.offset), handshake]); | ||
handshake.copy(sendBuffer, it.offset, 0, handshake.byteLength); | ||
return sendBuffer.subarray(0, it.offset + handshake.byteLength); | ||
}, | ||
@@ -97,3 +98,4 @@ [11 /* ERROR */]: (code, message = "") => { | ||
} else if (rawMessage !== void 0) { | ||
return Buffer.concat([sendBuffer.subarray(0, it.offset), rawMessage]); | ||
sendBuffer.set(rawMessage, it.offset); | ||
return sendBuffer.subarray(0, it.offset + rawMessage.byteLength); | ||
} else { | ||
@@ -100,0 +102,0 @@ return sendBuffer.subarray(0, it.offset); |
@@ -70,4 +70,4 @@ /// <reference types="node" /> | ||
reconnectionToken: string; | ||
raw(data: ArrayLike<number>, options?: ISendOptions, cb?: (err?: Error) => void): void; | ||
enqueueRaw(data: ArrayLike<number>, options?: ISendOptions): void; | ||
raw(data: Uint8Array | Buffer, options?: ISendOptions, cb?: (err?: Error) => void): void; | ||
enqueueRaw(data: Uint8Array | Buffer, options?: ISendOptions): void; | ||
/** | ||
@@ -74,0 +74,0 @@ * Send a type of message to the client. Messages are encoded with MsgPack and can hold any |
{ | ||
"name": "@colyseus/core", | ||
"version": "0.16.0-preview.9", | ||
"version": "0.16.0-preview.10", | ||
"description": "Multiplayer Framework for Node.js.", | ||
@@ -5,0 +5,0 @@ "input": "./src/index.ts", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
648738
7237