How to create a valid WebSocket close frame (server to client) using only ArrayBuffer, DataView, TypedArray, or Node.js Buffer? #5005
-
I created a WebSocket server that runs from the browser https://github.com/guest271314/direct-sockets-http-ws-server. I used code in a gist to parse and create frames. The gist code does not contain creating a valid close frame. Right now I'm using AbortController to about the WHATWG Stream. How to create a valid WebSocket close frame (server to client) using only ArrayBuffer, DataView, TypedArray, or Node.js Buffer? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! I think you can take a look at the |
Beta Was this translation helpful? Give feedback.
Hi! I think you can take a look at the
ws
implementation: https://github.com/websockets/ws/blob/96c9b3deddf56cacb2d756aaa918071e03cdbc42/lib/sender.js#L146-L198