mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
LibProtocol+RequestServer: Add IPC to dump RequestServer connection info
This was available on Serenity by sending SIGINFO to RequestServer. Add an IPC so we may see this info while running the browser. (cherry picked from commit e75ba44f377b9ba15186a0af89a6c52777038527)
This commit is contained in:
1 parent
4881c7ac47
commit
089d9735cf
5 files changed
+16
No files matched your search
@@ -146,4 +146,9 @@ void RequestClient::websocket_certificate_requested(i32 connection_id)
|
||||
maybe_connection.value()->did_request_certificates({});
|
||||
}
|
||||
|
||||
void RequestClient::dump_connection_info()
|
||||
{
|
||||
async_dump_connection_info();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -36,6 +36,8 @@ public:
|
||||
bool stop_request(Badge<Request>, Request&);
|
||||
bool set_certificate(Badge<Request>, Request&, ByteString, ByteString);
|
||||
|
||||
void dump_connection_info();
|
||||
|
||||
private:
|
||||
virtual void die() override;
|
||||
|
||||
|
||||
@@ -424,4 +424,9 @@ Messages::RequestServer::WebsocketSetCertificateResponse ConnectionFromClient::w
|
||||
return success;
|
||||
}
|
||||
|
||||
void ConnectionFromClient::dump_connection_info()
|
||||
{
|
||||
ConnectionCache::dump_jobs();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -80,6 +80,8 @@ private:
|
||||
virtual void websocket_close(i32, u16, ByteString const&) override;
|
||||
virtual Messages::RequestServer::WebsocketSetCertificateResponse websocket_set_certificate(i32, ByteString const&, ByteString const&) override;
|
||||
|
||||
virtual void dump_connection_info() override;
|
||||
|
||||
Threading::MutexProtected<HashMap<i32, OwnPtr<Request>>> m_requests;
|
||||
HashMap<i32, RefPtr<WebSocket::WebSocket>> m_websockets;
|
||||
|
||||
|
||||
@@ -22,4 +22,6 @@ endpoint RequestServer
|
||||
websocket_send(i32 connection_id, bool is_text, ByteBuffer data) =|
|
||||
websocket_close(i32 connection_id, u16 code, ByteString reason) =|
|
||||
websocket_set_certificate(i32 request_id, ByteString certificate, ByteString key) => (bool success)
|
||||
|
||||
dump_connection_info() =|
|
||||
}
|
||||
Reference in new issue
Block a user