socket-function 0.160.0 → 0.162.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generateIndexDts.js +2 -2
- package/index.d.ts +0 -4494
- package/package.json +1 -1
- package/src/webSocketServer.ts +3 -0
package/package.json
CHANGED
package/src/webSocketServer.ts
CHANGED
|
@@ -255,6 +255,9 @@ export async function startSocketServer(
|
|
|
255
255
|
// we pipe. This should be very efficient, as pipe has insane throughput
|
|
256
256
|
// (100s of MB/s, easily, even on a terrible machine).
|
|
257
257
|
socket.once("data", buffer => {
|
|
258
|
+
if (typeof buffer === "string") {
|
|
259
|
+
buffer = Buffer.from(buffer);
|
|
260
|
+
}
|
|
258
261
|
buffers.push(buffer);
|
|
259
262
|
let result = handleTLSHello(Buffer.concat(buffers), buffers.length);
|
|
260
263
|
if (result === "more") {
|