How to create a valid WebSocket close frame (server to client) using only ArrayBuffer, DataView, TypedArray, or Node.js Buffer? #5005
Answered
by
darrachequesne
guest271314
asked this question in
Q&A
-
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.
Answered by
darrachequesne
Apr 24, 2024
Replies: 1 comment 1 reply
-
Hi! I think you can take a look at the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
guest271314
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I think you can take a look at the
ws
implementation: https://github.com/websockets/ws/blob/96c9b3deddf56cacb2d756aaa918071e03cdbc42/lib/sender.js#L146-L198