mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:57:45 +00:00
LibCore: Move Stream-based sockets into the Core
namespace
This commit is contained in:
parent
d43a7eae54
commit
a96339b72b
123 changed files with 1157 additions and 1100 deletions
|
@ -12,7 +12,7 @@ namespace InspectorServer {
|
|||
|
||||
static HashMap<int, RefPtr<ConnectionFromClient>> s_connections;
|
||||
|
||||
ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket> socket, int client_id)
|
||||
ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::LocalSocket> socket, int client_id)
|
||||
: IPC::ConnectionFromClient<InspectorClientEndpoint, InspectorServerEndpoint>(*this, move(socket), client_id)
|
||||
{
|
||||
s_connections.set(client_id, *this);
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
virtual void die() override;
|
||||
|
||||
private:
|
||||
explicit ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket>, int client_id);
|
||||
explicit ConnectionFromClient(NonnullOwnPtr<Core::LocalSocket>, int client_id);
|
||||
|
||||
virtual Messages::InspectorServer::GetAllObjectsResponse get_all_objects(pid_t) override;
|
||||
virtual Messages::InspectorServer::SetInspectedObjectResponse set_inspected_object(pid_t, u64 object_id) override;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "InspectableProcess.h"
|
||||
#include <AK/JsonObject.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/Socket.h>
|
||||
|
||||
namespace InspectorServer {
|
||||
|
||||
|
@ -17,7 +18,7 @@ InspectableProcess* InspectableProcess::from_pid(pid_t pid)
|
|||
return g_processes.get(pid).value_or(nullptr);
|
||||
}
|
||||
|
||||
InspectableProcess::InspectableProcess(pid_t pid, NonnullOwnPtr<Core::Stream::LocalSocket> socket)
|
||||
InspectableProcess::InspectableProcess(pid_t pid, NonnullOwnPtr<Core::LocalSocket> socket)
|
||||
: m_pid(pid)
|
||||
, m_socket(move(socket))
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace InspectorServer {
|
|||
|
||||
class InspectableProcess {
|
||||
public:
|
||||
InspectableProcess(pid_t, NonnullOwnPtr<Core::Stream::LocalSocket>);
|
||||
InspectableProcess(pid_t, NonnullOwnPtr<Core::LocalSocket>);
|
||||
~InspectableProcess() = default;
|
||||
|
||||
void send_request(JsonObject const& request);
|
||||
|
@ -22,7 +22,7 @@ public:
|
|||
|
||||
private:
|
||||
pid_t m_pid { 0 };
|
||||
NonnullOwnPtr<Core::Stream::LocalSocket> m_socket;
|
||||
NonnullOwnPtr<Core::LocalSocket> m_socket;
|
||||
};
|
||||
|
||||
extern HashMap<pid_t, NonnullOwnPtr<InspectorServer::InspectableProcess>> g_processes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue