mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-12 02:30:30 +09:00
Base: Launch WebSocket at session start-up
This commit is contained in:
parent
ac7b0e69e5
commit
e9e94ef3cc
Notes:
sideshowbarker
2024-07-17 09:49:48 +09:00
Author: https://github.com/LucasChollet
Commit: e9e94ef3cc
Pull-request: https://github.com/SerenityOS/serenity/pull/14673
Reviewed-by: https://github.com/linusg
4 changed files with 11 additions and 12 deletions
|
@ -17,16 +17,6 @@ SystemModes=graphical
|
||||||
MultiInstance=true
|
MultiInstance=true
|
||||||
AcceptSocketConnections=true
|
AcceptSocketConnections=true
|
||||||
|
|
||||||
[WebSocket]
|
|
||||||
Socket=/tmp/portal/websocket
|
|
||||||
SocketPermissions=600
|
|
||||||
Lazy=true
|
|
||||||
Priority=low
|
|
||||||
User=anon
|
|
||||||
SystemModes=text,graphical
|
|
||||||
MultiInstance=true
|
|
||||||
AcceptSocketConnections=true
|
|
||||||
|
|
||||||
[NetworkServer]
|
[NetworkServer]
|
||||||
User=root
|
User=root
|
||||||
SystemModes=text,graphical,self-test
|
SystemModes=text,graphical,self-test
|
||||||
|
|
|
@ -19,6 +19,15 @@ SystemModes=graphical
|
||||||
MultiInstance=true
|
MultiInstance=true
|
||||||
AcceptSocketConnections=true
|
AcceptSocketConnections=true
|
||||||
|
|
||||||
|
[WebSocket]
|
||||||
|
Socket=/tmp/user/%uid/portal/websocket
|
||||||
|
SocketPermissions=600
|
||||||
|
Lazy=true
|
||||||
|
Priority=low
|
||||||
|
SystemModes=text,graphical
|
||||||
|
MultiInstance=true
|
||||||
|
AcceptSocketConnections=true
|
||||||
|
|
||||||
[LaunchServer]
|
[LaunchServer]
|
||||||
Socket=/tmp/user/%uid/portal/launch
|
Socket=/tmp/user/%uid/portal/launch
|
||||||
SocketPermissions=600
|
SocketPermissions=600
|
||||||
|
|
|
@ -18,7 +18,7 @@ class WebSocket;
|
||||||
class WebSocketClient final
|
class WebSocketClient final
|
||||||
: public IPC::ConnectionToServer<WebSocketClientEndpoint, WebSocketServerEndpoint>
|
: public IPC::ConnectionToServer<WebSocketClientEndpoint, WebSocketServerEndpoint>
|
||||||
, public WebSocketClientEndpoint {
|
, public WebSocketClientEndpoint {
|
||||||
IPC_CLIENT_CONNECTION(WebSocketClient, "/tmp/portal/websocket"sv)
|
IPC_CLIENT_CONNECTION(WebSocketClient, "/tmp/user/%uid/portal/websocket"sv)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RefPtr<WebSocket> connect(const URL&, String const& origin = {}, Vector<String> const& protocols = {}, Vector<String> const& extensions = {}, HashMap<String, String> const& request_headers = {});
|
RefPtr<WebSocket> connect(const URL&, String const& origin = {}, Vector<String> const& protocols = {}, Vector<String> const& extensions = {}, HashMap<String, String> const& request_headers = {});
|
||||||
|
|
|
@ -25,7 +25,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
||||||
TRY(Core::System::unveil("/etc/timezone", "r"));
|
TRY(Core::System::unveil("/etc/timezone", "r"));
|
||||||
TRY(Core::System::unveil("/tmp/user/%uid/portal/request", "rw"));
|
TRY(Core::System::unveil("/tmp/user/%uid/portal/request", "rw"));
|
||||||
TRY(Core::System::unveil("/tmp/portal/image", "rw"));
|
TRY(Core::System::unveil("/tmp/portal/image", "rw"));
|
||||||
TRY(Core::System::unveil("/tmp/portal/websocket", "rw"));
|
TRY(Core::System::unveil("/tmp/user/%uid/portal/websocket", "rw"));
|
||||||
TRY(Core::System::unveil(nullptr, nullptr));
|
TRY(Core::System::unveil(nullptr, nullptr));
|
||||||
|
|
||||||
Web::ImageDecoding::Decoder::initialize(WebView::ImageDecoderClientAdapter::create());
|
Web::ImageDecoding::Decoder::initialize(WebView::ImageDecoderClientAdapter::create());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue