/* * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include namespace InspectorServer { class InspectableProcess { public: InspectableProcess(pid_t, NonnullRefPtr); ~InspectableProcess(); void send_request(JsonObject const& request); String wait_for_response(); static InspectableProcess* from_pid(pid_t); private: pid_t m_pid { 0 }; NonnullRefPtr m_socket; }; extern HashMap> g_processes; }