mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 19:25:10 +00:00
Kernel: Add support for recv() with MSG_DONTWAIT.
Passing this flag to recv() temporarily puts the file descriptor into non-blocking mode. Also implement LocalSocket::recv() as a simple forwarding to read().
This commit is contained in:
parent
0b850cf726
commit
b3a1671f1a
5 changed files with 23 additions and 7 deletions
|
@ -204,7 +204,7 @@ ssize_t LocalSocket::sendto(FileDescriptor&, const void*, size_t, int, const soc
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
ssize_t LocalSocket::recvfrom(FileDescriptor&, void*, size_t, int flags, sockaddr*, socklen_t*)
|
||||
ssize_t LocalSocket::recvfrom(FileDescriptor& descriptor, void* buffer, size_t buffer_size, int, sockaddr*, socklen_t*)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
return read(descriptor, (byte*)buffer, buffer_size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue