mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:37:35 +00:00
LibCore+Everywhere: Make Core::Stream read_until() return Bytes
This affects BufferedSeekable::read_until() and ::read_until_any_of(). For the reasoning, see the previous commit about Core::Stream::read().
This commit is contained in:
parent
3b1e063d30
commit
c4134e9794
4 changed files with 19 additions and 19 deletions
|
@ -56,8 +56,8 @@ bool Job::can_read_line() const
|
|||
String Job::read_line(size_t size)
|
||||
{
|
||||
ByteBuffer buffer = ByteBuffer::create_uninitialized(size).release_value_but_fixme_should_propagate_errors();
|
||||
auto nread = MUST(m_socket->read_until(buffer, "\r\n"sv));
|
||||
return String::copy(buffer.span().slice(0, nread));
|
||||
auto bytes_read = MUST(m_socket->read_until(buffer, "\r\n"sv));
|
||||
return String::copy(bytes_read);
|
||||
}
|
||||
|
||||
ByteBuffer Job::receive(size_t size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue