Introduce Socket.shutdown()

This commit is contained in:
rexim
2025-02-06 12:27:04 +07:00
committed by Christoffer Lerno
parent 27e76fe59e
commit 122179980c
3 changed files with 44 additions and 1 deletions

View File

@@ -1,5 +1,10 @@
module libc @if(env::POSIX);
const CInt SHUT_RD = 0;
const CInt SHUT_WR = 1;
const CInt SHUT_RDWR = 2;
extern fn CInt shutdown(Fd sockfd, CInt how);
extern fn isz recv(Fd socket, void *buffer, usz length, CInt flags);
extern fn isz send(Fd socket, void *buffer, usz length, CInt flags);