mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
![Guilherme Gonçalves](/assets/img/avatar_default.png)
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.
29 lines
795 B
C++
29 lines
795 B
C++
/*
|
|
* Copyright (c) 2022, Dex♪ <dexes.ttp@gmail.com>
|
|
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibWeb/WebSockets/WebSocket.h>
|
|
#include <LibWebSocket/ConnectionInfo.h>
|
|
#include <LibWebSocket/Message.h>
|
|
#include <LibWebSocket/WebSocket.h>
|
|
|
|
#pragma once
|
|
|
|
namespace Ladybird {
|
|
|
|
class WebSocketClientManagerLadybird : public Web::WebSockets::WebSocketClientManager {
|
|
public:
|
|
static NonnullRefPtr<WebSocketClientManagerLadybird> create();
|
|
|
|
virtual ~WebSocketClientManagerLadybird() override;
|
|
virtual RefPtr<Web::WebSockets::WebSocketClientSocket> connect(AK::URL const&, DeprecatedString const& origin, Vector<DeprecatedString> const& protocols) override;
|
|
|
|
private:
|
|
WebSocketClientManagerLadybird();
|
|
};
|
|
|
|
}
|