mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibIPC: Remove socket path from IPC Client connections
We don't need these for Ladybird, and they are the only users of some LibCore functions we can remove as well.
This commit is contained in:
parent
310cdc35f0
commit
1549d393b9
Notes:
github-actions[bot]
2024-11-26 10:01:57 +00:00
Author: https://github.com/ADKaster
Commit: 1549d393b9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2582
5 changed files with 4 additions and 18 deletions
|
@ -11,20 +11,6 @@
|
|||
|
||||
namespace IPC {
|
||||
|
||||
#define IPC_CLIENT_CONNECTION(klass, socket_path) \
|
||||
C_OBJECT_ABSTRACT(klass) \
|
||||
public: \
|
||||
template<typename Klass = klass, class... Args> \
|
||||
static ErrorOr<NonnullRefPtr<klass>> try_create(Args&&... args) \
|
||||
{ \
|
||||
auto parsed_socket_path = TRY(Core::SessionManagement::parse_path_with_sid(socket_path)); \
|
||||
auto socket = TRY(Core::LocalSocket::connect(move(parsed_socket_path))); \
|
||||
/* We want to rate-limit our clients */ \
|
||||
TRY(socket->set_blocking(true)); \
|
||||
\
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) Klass(IPC::Transport(move(socket)), forward<Args>(args)...)); \
|
||||
}
|
||||
|
||||
template<typename ClientEndpoint, typename ServerEndpoint>
|
||||
class ConnectionToServer : public IPC::Connection<ClientEndpoint, ServerEndpoint>
|
||||
, public ClientEndpoint::Stub
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue