forked from supabase/edge-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: WebSocket upgrade support (supabase#271)
* stamp(sb_workers): polishing * stamp: add `http_utils` crate * stamp: update dependencies * stamp: update `Cargo.lock` * refactor: remove watcher api and introduce supabase tag api * feat: websocket upgrade support * stamp: rid duplicate things * stamp(base): add dev dependencies * stamp: add websocket upgrade test * stamp: add websocket upgrade examples * stamp: add websocket upgrade example for main worker * stamp(http_utils): add license header
- Loading branch information
1 parent
832531e
commit 1399bb2
Showing
27 changed files
with
1,297 additions
and
188 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Deno.serve(async (req: Request) => { | ||
const { socket, response } = Deno.upgradeWebSocket(req); | ||
|
||
socket.onopen = () => { | ||
socket.send("meow"); | ||
}; | ||
|
||
socket.onmessage = ev => { | ||
socket.send(ev.data); | ||
}; | ||
|
||
return response; | ||
}); |
Oops, something went wrong.