mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:57:34 +00:00
LibProtocol: Remove use of ByteBuffer::wrap() in protocol API
This commit is contained in:
parent
77515fead2
commit
685d5f4e25
6 changed files with 10 additions and 10 deletions
|
@ -116,12 +116,12 @@ private:
|
|||
bool m_might_be_wrong { false };
|
||||
};
|
||||
|
||||
static void do_write(const ByteBuffer& payload)
|
||||
static void do_write(ReadonlyBytes payload)
|
||||
{
|
||||
size_t length_remaining = payload.size();
|
||||
size_t length_written = 0;
|
||||
while (length_remaining > 0) {
|
||||
auto nwritten = fwrite(payload.offset_pointer(length_written), sizeof(char), length_remaining, stdout);
|
||||
auto nwritten = fwrite(payload.data() + length_written, sizeof(char), length_remaining, stdout);
|
||||
if (nwritten > 0) {
|
||||
length_remaining -= nwritten;
|
||||
length_written += nwritten;
|
||||
|
@ -192,7 +192,7 @@ int main(int argc, char** argv)
|
|||
previous_downloaded_size = downloaded_size;
|
||||
prev_time = current_time;
|
||||
};
|
||||
download->on_finish = [&](bool success, auto& payload, auto, auto& response_headers, auto) {
|
||||
download->on_finish = [&](bool success, auto payload, auto, auto& response_headers, auto) {
|
||||
fprintf(stderr, "\033]9;-1;\033\\");
|
||||
fprintf(stderr, "\n");
|
||||
if (success && save_at_provided_name) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue