1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

LibCore: Add fd() and notifier() accessors to Core::Stream::LocalSocket

This commit is contained in:
Andreas Kling 2022-10-05 15:28:05 +02:00
parent 35966cabe4
commit eb709ddd63
2 changed files with 10 additions and 0 deletions

View file

@ -678,6 +678,13 @@ ErrorOr<Bytes> LocalSocket::read_without_waiting(Bytes buffer)
return m_helper.read(buffer, MSG_DONTWAIT);
}
Optional<int> LocalSocket::fd() const
{
if (!is_open())
return {};
return m_helper.fd();
}
ErrorOr<int> LocalSocket::release_fd()
{
if (!is_open()) {