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:
parent
35966cabe4
commit
eb709ddd63
2 changed files with 10 additions and 0 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue