mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
CHttpJob: Drive response download via on_ready_read instead of blocking
This allows the event loop to service events while an HTTP download is happening. Pretty cool :^)
This commit is contained in:
parent
72b69b82bb
commit
b5aac9c44b
2 changed files with 25 additions and 28 deletions
|
@ -16,6 +16,7 @@ public:
|
|||
|
||||
private:
|
||||
void on_socket_connected();
|
||||
void finish_up();
|
||||
|
||||
enum class State {
|
||||
InStatus,
|
||||
|
@ -29,4 +30,6 @@ private:
|
|||
State m_state { State::InStatus };
|
||||
int m_code { -1 };
|
||||
HashMap<String, String> m_headers;
|
||||
Vector<ByteBuffer> m_received_buffers;
|
||||
size_t m_received_size { 0 };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue