mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:37:45 +00:00
ProtocolServer: Send the download payload to clients as a shared buffer
The DownloadFinished message from the server now includes a buffer ID that can be mapped into the client program. To avoid prematurely destroying the buffer, the server will hang on to it until the client lets it know that they're all good. That's what the ProtocolServer::DisownSharedBuffer message is about. In the future it would be nice if the kernel had a mechanism to allow passing ownership of a shared buffer along with an IPC message somehow.
This commit is contained in:
parent
88c5126fa7
commit
eb85103271
10 changed files with 47 additions and 6 deletions
|
@ -18,7 +18,7 @@ public:
|
|||
i32 start_download(const String& url);
|
||||
bool stop_download(i32 download_id);
|
||||
|
||||
Function<void(i32 download_id, bool success)> on_download_finish;
|
||||
Function<void(i32 download_id, bool success, u32 total_size, i32 shared_buffer_id)> on_download_finish;
|
||||
Function<void(i32 download_id, u64 total_size, u64 downloaded_size)> on_download_progress;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue