-
Notifications
You must be signed in to change notification settings - Fork 237
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
how to upgrade an http server to websockets? #308
Comments
I think I figured out how to extract the websockets It did require one tweak to your http module: Stay tuned for a PR with that change against master / public. (meanwhile, it went into #305 too). FWIW, my client code that mostly works (though I need to support computing http responses asynchronously somehow; more on that separately, if I can't figure it out soon...): https://github.com/dckc/agoric-sdk/blob/e7b49bcce7517a871057b05d9828a46324202057/packages/cosmic-swingset/lib/xs-node-api/http.js |
p.s. Now I'm getting: Maybe there's a quick fix for that... |
yup: https://github.com/dckc/agoric-sdk/blame/xs-build-lite/packages/cosmic-swingset/lib/xs-npm/ws.js#L48 |
The websocket server seems to always create its own listener socket. I'm trying to support an application (Agoric ag-solo, web.js) that initially uses its socket for ordinary GET requests for index.html and such before UPGRADEing to websockets. The popular ws package supports a
noServer
mode where an http handler can pass its socket when an UPGRDADE request comes in.Any suggestions on how to do this?
My guess is I should make a revised websockets.js module.
The text was updated successfully, but these errors were encountered: