mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 08:48:57 +00: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.
This commit is contained in:
parent
62fa84865d
commit
e75ba44f37
Notes:
github-actions[bot]
2024-08-03 19:54:14 +00:00
Author: https://github.com/trflynn89
Commit: e75ba44f37
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/946
Reviewed-by: https://github.com/alimpfard ✅
5 changed files with 16 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -384,4 +384,9 @@ Messages::RequestServer::WebsocketSetCertificateResponse ConnectionFromClient::w
|
|||
return success;
|
||||
}
|
||||
|
||||
void ConnectionFromClient::dump_connection_info()
|
||||
{
|
||||
ConnectionCache::dump_jobs();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -66,6 +66,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() =|
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue