mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
AudioServer: Port to socket takeover
This commit is contained in:
parent
22a05621d5
commit
bd55938985
Notes:
sideshowbarker
2024-07-19 11:03:50 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/bd559389858 Pull-request: https://github.com/SerenityOS/serenity/pull/827
3 changed files with 4 additions and 3 deletions
|
@ -21,6 +21,7 @@ KeepAlive=1
|
||||||
User=anon
|
User=anon
|
||||||
|
|
||||||
[AudioServer]
|
[AudioServer]
|
||||||
|
Socket=/tmp/portal/audio
|
||||||
Priority=high
|
Priority=high
|
||||||
KeepAlive=1
|
KeepAlive=1
|
||||||
User=anon
|
User=anon
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <SharedBuffer.h>
|
#include <SharedBuffer.h>
|
||||||
|
|
||||||
AClientConnection::AClientConnection()
|
AClientConnection::AClientConnection()
|
||||||
: ConnectionNG(*this, "/tmp/asportal")
|
: ConnectionNG(*this, "/tmp/portal/audio")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
ASEventLoop::ASEventLoop()
|
ASEventLoop::ASEventLoop()
|
||||||
: m_server(CLocalServer::construct())
|
: m_server(CLocalServer::construct())
|
||||||
{
|
{
|
||||||
unlink("/tmp/asportal");
|
bool ok = m_server->take_over_from_system_server();
|
||||||
m_server->listen("/tmp/asportal");
|
ASSERT(ok);
|
||||||
m_server->on_ready_to_accept = [this] {
|
m_server->on_ready_to_accept = [this] {
|
||||||
auto client_socket = m_server->accept();
|
auto client_socket = m_server->accept();
|
||||||
if (!client_socket) {
|
if (!client_socket) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue