Net: Add a basic sys$shutdown() implementation

Calling shutdown prevents further reads and/or writes on a socket.
We should do a few more things based on the type of socket, but this
initial implementation just puts the basic mechanism in place.

Work towards #428.
This commit is contained in:
Andreas Kling 2020-02-08 00:52:33 +01:00
commit 2b0b7cc5a4
Notes: sideshowbarker 2024-07-19 09:32:27 +09:00
8 changed files with 60 additions and 2 deletions

View file

@ -387,6 +387,10 @@ struct pollfd {
#define SOCK_NONBLOCK 04000
#define SOCK_CLOEXEC 02000000
#define SHUT_RD 1
#define SHUT_WR 2
#define SHUT_RDWR 3
#define MSG_DONTWAIT 0x40
#define SOL_SOCKET 1