mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
ProtocolServer: Port to socket takeover
This commit is contained in:
parent
bd55938985
commit
9eaac26eda
Notes:
sideshowbarker
2024-07-19 11:03:44 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/9eaac26eda1 Pull-request: https://github.com/SerenityOS/serenity/pull/827
@ -5,6 +5,7 @@ StdIO=/dev/tty1
|
||||
Priority=high
|
||||
|
||||
[ProtocolServer]
|
||||
Socket=/tmp/portal/protocol
|
||||
Priority=low
|
||||
KeepAlive=1
|
||||
User=anon
|
||||
|
@ -5,7 +5,7 @@
|
||||
namespace LibProtocol {
|
||||
|
||||
Client::Client()
|
||||
: ConnectionNG(*this, "/tmp/psportal")
|
||||
: ConnectionNG(*this, "/tmp/portal/protocol")
|
||||
{
|
||||
handshake();
|
||||
}
|
||||
|
@ -9,8 +9,8 @@ int main(int, char**)
|
||||
CEventLoop event_loop;
|
||||
(void)*new HttpProtocol;
|
||||
auto server = CLocalServer::construct();
|
||||
unlink("/tmp/psportal");
|
||||
server->listen("/tmp/psportal");
|
||||
bool ok = server->take_over_from_system_server();
|
||||
ASSERT(ok);
|
||||
server->on_ready_to_accept = [&] {
|
||||
auto client_socket = server->accept();
|
||||
if (!client_socket) {
|
||||
|
Loading…
Reference in New Issue
Block a user