1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

LibWeb+LibWebSocket: DOM WebSocket subprotocol support

This adds support for WebSocket subprotocols to WebSocket DOM
objects, with some necessary plumbing to LibWebSocket and its
clients.

See the associated pull request for how this was tested.
This commit is contained in:
Guilherme Gonçalves 2022-12-31 10:37:10 +00:00 committed by Andreas Kling
parent 9115e99e4b
commit 230c0b34d4
19 changed files with 107 additions and 34 deletions

View file

@ -5,6 +5,7 @@ endpoint WebSocketServer
// Connection API
connect(URL url, DeprecatedString origin, Vector<DeprecatedString> protocols, Vector<DeprecatedString> extensions, IPC::Dictionary additional_request_headers) => (i32 connection_id)
ready_state(i32 connection_id) => (u32 ready_state)
subprotocol_in_use(i32 connection_id) => (DeprecatedString subprotocol_in_use)
send(i32 connection_id, bool is_text, ByteBuffer data) =|
close(i32 connection_id, u16 code, DeprecatedString reason) =|