-
-
Notifications
You must be signed in to change notification settings - Fork 718
redbean: add websocket support #1388
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
base: master
Are you sure you want to change the base?
Conversation
That would probably be a better way to do it, but I didn't have access to the original repository containing the work so I just copied over all the changes to my repository. I can re-organize it so it contains their changes. |
Copies part of YieldGenerator to StreamWS
reject surrogate pairs (U+D800 to U+DFFF) reject greater than U+10FFFF
@pkulchenko should be updated now |
Looks good; thank you for incorporating those changes! @jart, do you have a copyright assignment from @wingdeans (from #967)? |
@jart it's been about a month since I opened this PR, can you please check on @wingdeans' copyright assignment (should be #967 )? Thank you! |
Sure I'll take a look this week. |
Any updates on this feature? I would love to see it merged. Thank you! |
Hi there. I was interested in adding websockets to redbean in 2022 (#439). Now that this PR landed, I have questions that aren't answered in the readme. (In fact, the readme still states that websockets "may be added in the future" FYI. Given the forking nature of redbean as a webserver, how does this work with websockets (ws)? If inbound ws are each handled by a different process, then how do they communicate with each other? If a single process is handling all ws, how does one program their interaction? Is there a C or Lua API for doing that? Are there any benchmarks or resource-usage statistics available? I'd be happy to pitch in, especially for the last one. I'm no Kyle Kingsbury but I can test a thing. |
Cleans up #967 by adding some tests for the
isutf8
changes and websocket handshake, removing unused variables, and fixing the failing autobahn-testsuite test.This also adds a basic websocket echo server to the
redbean-tester
at/ws
.I'd like to add more tests but I don't know the best way to do so:
redbean_test.c
, orws_test.lua
file to run theautobahn-testsuite
against the server.Advice and feedback is appreciated. I am new to sockets programming. I'm in the Discord all the time, or can respond to questions/feeback here if that's preferable. 🙂
Closes #439
To run more detailed tests (once
o//test/tool/net/redbean-tester
is running):config/fuzzingclient.json
should contain:Results will then be available at
${PWD}/reports/servers/index.html