1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:34:57 +00:00
serenity/Userland/Services/RequestServer/RequestClient.ipc
Ali Mohammad Pur 6dfb2f9dc8 Everywhere: Merge the WebSocket service into RequestServer
This keeps the APIs separate as they are wildly different, a future
improvement could be to somehow unify the APIs (if possible).

Closes #23080.
2024-03-06 10:07:27 +01:00

20 lines
886 B
Text

#include <AK/URL.h>
endpoint RequestClient
{
request_started(i32 request_id, IPC::File fd) =|
request_progress(i32 request_id, Optional<u64> total_size, u64 downloaded_size) =|
request_finished(i32 request_id, bool success, u64 total_size) =|
headers_became_available(i32 request_id, HashMap<ByteString,ByteString,CaseInsensitiveStringTraits> response_headers, Optional<u32> status_code) =|
// Websocket API
// FIXME: See if this can be merged with the regular APIs
websocket_connected(i32 connection_id) =|
websocket_received(i32 connection_id, bool is_text, ByteBuffer data) =|
websocket_errored(i32 connection_id, i32 message) =|
websocket_closed(i32 connection_id, u16 code, ByteString reason, bool clean) =|
websocket_certificate_requested(i32 request_id) =|
// Certificate requests
certificate_requested(i32 request_id) =|
}