mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 08:52:54 +00:00
Ladybird: Add subclass of WebSocket::WebSocketImpl using Qt networking
This commit is contained in:
parent
acd70f44c2
commit
385c12c8b6
Notes:
sideshowbarker
2024-07-17 18:23:22 +09:00
Author: https://github.com/awesomekling
Commit: 385c12c8b6
Pull-request: https://github.com/SerenityOS/serenity/pull/16583
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg
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