mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Base: Launch WebSocket at session start-up
This commit is contained in:
parent
ac7b0e69e5
commit
e9e94ef3cc
|
@ -17,16 +17,6 @@ SystemModes=graphical
|
|||
MultiInstance=true
|
||||
AcceptSocketConnections=true
|
||||
|
||||
[WebSocket]
|
||||
Socket=/tmp/portal/websocket
|
||||
SocketPermissions=600
|
||||
Lazy=true
|
||||
Priority=low
|
||||
User=anon
|
||||
SystemModes=text,graphical
|
||||
MultiInstance=true
|
||||
AcceptSocketConnections=true
|
||||
|
||||
[NetworkServer]
|
||||
User=root
|
||||
SystemModes=text,graphical,self-test
|
||||
|
|
|
@ -19,6 +19,15 @@ SystemModes=graphical
|
|||
MultiInstance=true
|
||||
AcceptSocketConnections=true
|
||||
|
||||
[WebSocket]
|
||||
Socket=/tmp/user/%uid/portal/websocket
|
||||
SocketPermissions=600
|
||||
Lazy=true
|
||||
Priority=low
|
||||
SystemModes=text,graphical
|
||||
MultiInstance=true
|
||||
AcceptSocketConnections=true
|
||||
|
||||
[LaunchServer]
|
||||
Socket=/tmp/user/%uid/portal/launch
|
||||
SocketPermissions=600
|
||||
|
|
|
@ -18,7 +18,7 @@ class WebSocket;
|
|||
class WebSocketClient final
|
||||
: public IPC::ConnectionToServer<WebSocketClientEndpoint, WebSocketServerEndpoint>
|
||||
, public WebSocketClientEndpoint {
|
||||
IPC_CLIENT_CONNECTION(WebSocketClient, "/tmp/portal/websocket"sv)
|
||||
IPC_CLIENT_CONNECTION(WebSocketClient, "/tmp/user/%uid/portal/websocket"sv)
|
||||
|
||||
public:
|
||||
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("/tmp/user/%uid/portal/request", "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));
|
||||
|
||||
Web::ImageDecoding::Decoder::initialize(WebView::ImageDecoderClientAdapter::create());
|
||||
|
|
Loading…
Reference in a new issue