ladybird/Userland/Libraries/LibWebSocket
Sam Atkins 3b1e063d30 LibCore+Everywhere: Make Core::Stream::read() return Bytes
A mistake I've repeatedly made is along these lines:
```c++
auto nread = TRY(source_file->read(buffer));
TRY(destination_file->write(buffer));
```

It's a little clunky to have to create a Bytes or StringView from the
buffer's data pointer and the nread, and easy to forget and just use
the buffer. So, this patch changes the read() function to return a
Bytes of the data that were just read.

The other read_foo() methods will be modified in the same way in
subsequent commits.

Fixes #13687
2022-04-16 13:27:51 -04:00
..
Impl LibCore+Everywhere: Make Core::Stream::read() return Bytes 2022-04-16 13:27:51 -04:00
CMakeLists.txt LibWebSocket: Switch to using Core::Stream 2022-02-06 13:10:10 +01:00
ConnectionInfo.cpp LibWebSocket+telws: Use my own copyright headers :^) 2021-04-25 19:04:34 +02:00
ConnectionInfo.h LibCore+Userland: Remove Core::TCPSocket :^) 2022-02-06 17:28:17 +00:00
Message.h Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOr 2022-01-24 22:36:09 +01:00
WebSocket.cpp Libraries: Use default constructors/destructors in LibWebSocket 2022-03-13 22:34:38 +01:00
WebSocket.h Libraries: Use default constructors/destructors in LibWebSocket 2022-03-13 22:34:38 +01:00