mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
LibWebSocket: Allow library clients to provide their own WebSocketImpl
This commit is contained in:
parent
8e50809f20
commit
9bbad08546
2 changed files with 9 additions and 7 deletions
|
@ -25,7 +25,7 @@ enum class ReadyState {
|
|||
class WebSocket final : public Core::Object {
|
||||
C_OBJECT(WebSocket)
|
||||
public:
|
||||
static NonnullRefPtr<WebSocket> create(ConnectionInfo);
|
||||
static NonnullRefPtr<WebSocket> create(ConnectionInfo, RefPtr<WebSocketImpl> = nullptr);
|
||||
virtual ~WebSocket() override = default;
|
||||
|
||||
URL const& url() const { return m_connection.url(); }
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
Function<void(Error)> on_error;
|
||||
|
||||
private:
|
||||
explicit WebSocket(ConnectionInfo);
|
||||
WebSocket(ConnectionInfo, RefPtr<WebSocketImpl>);
|
||||
|
||||
// As defined in section 5.2
|
||||
enum class OpCode : u8 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue