socket: provide function for closing reusable sockets

This commit is contained in:
Miroslav Lichvar
2023-11-20 13:34:38 +01:00
parent ee9d721b7b
commit 0aa4d5ac14
2 changed files with 17 additions and 6 deletions

View File

@@ -112,6 +112,9 @@ extern int SCK_OpenUnixSocketPair(int flags, int *other_fd);
/* Check if a file descriptor was passed from the service manager */
extern int SCK_IsReusable(int sock_fd);
/* Close all reusable sockets before finalisation (e.g. in a helper process) */
extern void SCK_CloseReusableSockets(void);
/* Set and get a socket option of int size */
extern int SCK_SetIntOption(int sock_fd, int level, int name, int value);
extern int SCK_GetIntOption(int sock_fd, int level, int name, int *value);