1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:17:46 +00:00

LibCore+LibIPC: Make Core::Stream read_without_waiting() return Bytes

For the reasoning, see the earlier commit about Core::Stream::read().
This commit is contained in:
Sam Atkins 2022-04-15 15:11:11 +01:00 committed by Tim Flynn
parent d564cf1e89
commit fe5fdb200b
3 changed files with 9 additions and 9 deletions

View file

@ -552,9 +552,9 @@ ErrorOr<pid_t> LocalSocket::peer_pid() const
#endif
}
ErrorOr<size_t> LocalSocket::read_without_waiting(Bytes buffer)
ErrorOr<Bytes> LocalSocket::read_without_waiting(Bytes buffer)
{
return TRY(m_helper.read(buffer, MSG_DONTWAIT)).size();
return m_helper.read(buffer, MSG_DONTWAIT);
}
ErrorOr<int> LocalSocket::release_fd()

View file

@ -444,7 +444,7 @@ public:
ErrorOr<int> receive_fd(int flags);
ErrorOr<void> send_fd(int fd);
ErrorOr<pid_t> peer_pid() const;
ErrorOr<size_t> read_without_waiting(Bytes buffer);
ErrorOr<Bytes> read_without_waiting(Bytes buffer);
/// Release the fd associated with this LocalSocket. After the fd is
/// released, the socket will be considered "closed" and all operations done