1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

ProtocolServer: Avoid blocking all downloads when client stops reading

Fixes #4668.
This commit is contained in:
AnotherTest 2020-12-31 01:42:44 +03:30 committed by Andreas Kling
parent 83fed3fd5d
commit 2568a93b5d
7 changed files with 45 additions and 28 deletions

View file

@ -27,6 +27,7 @@
#pragma once
#include <AK/RefPtr.h>
#include <AK/Result.h>
#include <AK/URL.h>
#include <ProtocolServer/Forward.h>
@ -43,6 +44,11 @@ public:
protected:
explicit Protocol(const String& name);
struct Pipe {
int read_fd { -1 };
int write_fd { -1 };
};
static Result<Pipe, String> get_pipe_for_download();
private:
String m_name;