mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
LibWebSocket: Make WebSocketImpl an abstract class
The LibCore sockets implementation becomes WebSocketImplSerenity. This will allow us to create a custom WebSocketImpl subclass for Qt to use in Ladybird.
This commit is contained in:
parent
cc78a74c51
commit
be5f6aa46e
6 changed files with 144 additions and 81 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <AK/Base64.h>
|
||||
#include <AK/Random.h>
|
||||
#include <LibCrypto/Hash/HashManager.h>
|
||||
#include <LibWebSocket/Impl/WebSocketImplSerenity.h>
|
||||
#include <LibWebSocket/WebSocket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -30,7 +31,7 @@ void WebSocket::start()
|
|||
{
|
||||
VERIFY(m_state == WebSocket::InternalState::NotStarted);
|
||||
VERIFY(!m_impl);
|
||||
m_impl = WebSocketImpl::construct();
|
||||
m_impl = adopt_ref(*new WebSocketImplSerenity);
|
||||
|
||||
m_impl->on_connection_error = [this] {
|
||||
dbgln("WebSocket: Connection error (underlying socket)");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue