1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +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

@ -32,6 +32,8 @@ public:
ReadyState ready_state();
DeprecatedString subprotocol_in_use();
// Call this to start the WebSocket connection.
void start();
@ -95,6 +97,8 @@ private:
InternalState m_state { InternalState::NotStarted };
DeprecatedString m_subprotocol_in_use { DeprecatedString::empty() };
DeprecatedString m_websocket_key;
bool m_has_read_server_handshake_first_line { false };
bool m_has_read_server_handshake_upgrade { false };