New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements to WebSocket
and ServerWebSocket
#3257
Conversation
❌ @Electroid [warn] test/js/bun/websocket/websocket-server.test.ts
[warn] test/js/first_party/ws/ws.test.ts
[warn] src/js/thirdparty/ws.js
[warn] Code style issues found in 3 files. Forgot to run Prettier?
error: "prettier" exited with code 1 (SIGHUP)
Checking formatting... To one-off fix this manually, run: bun fmt You might need to run |
❌ @Electroid 11 files with test failures on bun-darwin-aarch64:
|
❌ @Electroid 4 files with test failures on linux-x64:
|
❌ @Electroid 4 files with test failures on linux-x64-baseline:
|
❌ @Electroid 8 files with test failures on bun-darwin-x64-baseline:
|
is the binary type default on the global WebSocket client? because that kind of breaking change would break the web websocket spec- ideally those should match the browser |
Bun already doesn’t support Blob for binaryType
Note that websocket messages say whether binary or text, it’s not a
decision we make
…On Fri, Jun 9, 2023 at 9:31 AM dave caruso ***@***.***> wrote:
is the binary type default on the global WebSocket client? because that
kind of breaking change would break the web websocket spec- ideally those
should match the browser
—
Reply to this email directly, view it on GitHub
<#3257 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFNGS34IUBTM5DXOE4HTJDXKNFW7ANCNFSM6AAAAAAZARZOLI>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
20c418b
to
b39fd3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after tests run
Looks like there's a flaky test with the websocket server, will take a look. (it's probably uws related) |
New stuff
binaryType
inWebSocket
is now "nodebuffer" to match the server [breaking]ws.terminate()
- abruptly closes the connectionws.ping(data?)
- sends a pingws.pong(data?)
- sends a pongBug fixes
ws.close(1000, "non-ascii")
was not encoded properlyhostname
andpathname
were not encoded properly on WebSocket upgradeidleTimeout
could crash if between(0, 8]
due to uws limitation