1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +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:
Andreas Kling 2019-05-20 03:44:45 +02:00
parent 0b850cf726
commit b3a1671f1a
5 changed files with 23 additions and 7 deletions

View file

@ -329,6 +329,8 @@ struct pollfd {
#define SOCK_NONBLOCK 04000
#define SOCK_CLOEXEC 02000000
#define MSG_DONTWAIT 0x40
#define SOL_SOCKET 1
#define SO_RCVTIMEO 1