1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:57:45 +00:00

LibCore+Inspector: Reverse the direction of Inspector connections

Core::EventLoop now makes an outbound connection to InspectorServer
instead of listening for incoming connections on a /tmp/rpc/PID socket.

This has many benefits, for example:
- We no longer keep an open listening socket in most applications
- We stop leaking socket files in /tmp/rpc
- We can tighten the pledges in many programs (patch coming)
This commit is contained in:
Andreas Kling 2021-05-13 22:42:11 +02:00
parent 3d3a5b431f
commit dc25a4e249
6 changed files with 77 additions and 121 deletions

View file

@ -48,7 +48,7 @@ private:
ObjectClassRegistration* m_parent_class { nullptr };
};
class RPCClient;
class InspectorServerConnection;
enum class TimerShouldFireWhenNotVisible {
No = 0,
@ -155,8 +155,8 @@ public:
bool is_being_inspected() const { return m_inspector_count; }
void increment_inspector_count(Badge<RPCClient>);
void decrement_inspector_count(Badge<RPCClient>);
void increment_inspector_count(Badge<InspectorServerConnection>);
void decrement_inspector_count(Badge<InspectorServerConnection>);
virtual bool load_from_json(const JsonObject&, RefPtr<Core::Object> (*)(const String&)) { return false; }