mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 16:55:09 +00:00
Ladybird: Add subclass of WebSocket::WebSocketImpl using Qt networking
This commit is contained in:
parent
acd70f44c2
commit
385c12c8b6
4 changed files with 140 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
#include "WebSocketClientManagerLadybird.h"
|
||||
#include "WebSocketImplQt.h"
|
||||
#include "WebSocketLadybird.h"
|
||||
|
||||
namespace Ladybird {
|
||||
|
@ -23,8 +24,10 @@ RefPtr<Web::WebSockets::WebSocketClientSocket> WebSocketClientManagerLadybird::c
|
|||
WebSocket::ConnectionInfo connection_info(url);
|
||||
connection_info.set_origin(origin);
|
||||
|
||||
auto connection = WebSocketLadybird::create(WebSocket::WebSocket::create(move(connection_info)));
|
||||
return connection;
|
||||
auto impl = adopt_ref(*new WebSocketImplQt);
|
||||
auto web_socket = WebSocket::WebSocket::create(move(connection_info), move(impl));
|
||||
web_socket->start();
|
||||
return WebSocketLadybird::create(web_socket);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue