summaryrefslogtreecommitdiff
path: root/Libraries/LibCore/CEventLoop.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-17 11:35:09 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-17 11:39:26 +0200
commit1febd59f830d0c5ee240b73c7fd376c18f76f754 (patch)
tree16ad6282ca0b0a525546b0cc7bd6413b7b60fc15 /Libraries/LibCore/CEventLoop.h
parent2fa2d72761d4cbe3b7b305bbd0205e5b05fe4899 (diff)
downloadserenity-1febd59f830d0c5ee240b73c7fd376c18f76f754.zip
LibCore+rpcdump: Publish CObject graph to on-demand RPC socket
All programs that have a CEventLoop now allow local socket connections via /tmp/rpc.PID and will dump a serialized JSON array of all the live CObjects in the program onto connecting sockets. Also added a small /bin/rpcdump tool that connects to an RPC socket and produces a raw dump of the JSON that comes out.
Diffstat (limited to 'Libraries/LibCore/CEventLoop.h')
-rw-r--r--Libraries/LibCore/CEventLoop.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Libraries/LibCore/CEventLoop.h b/Libraries/LibCore/CEventLoop.h
index 41cb35bc36..aa7777b768 100644
--- a/Libraries/LibCore/CEventLoop.h
+++ b/Libraries/LibCore/CEventLoop.h
@@ -5,8 +5,9 @@
#include <AK/OwnPtr.h>
#include <AK/Vector.h>
#include <AK/WeakPtr.h>
-#include <LibCore/CLock.h>
#include <LibCore/CEvent.h>
+#include <LibCore/CLocalServer.h>
+#include <LibCore/CLock.h>
#include <sys/select.h>
#include <sys/time.h>
#include <time.h>
@@ -85,4 +86,6 @@ private:
static int s_next_timer_id;
static HashTable<CNotifier*>* s_notifiers;
+
+ static CLocalServer s_rpc_server;
};