You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`demi_setsockopt` - Gets a socket option on a socket I/O queue.
6
+
7
+
## Synopsis
8
+
9
+
```c
10
+
#include<demi/libos.h>
11
+
#include<sys/socket.h>/* For SOL_SOCKET. */
12
+
13
+
intdemi_setsockopt(int sockqd, int level, int optname, const void *optval, socklen_t optlen);
14
+
```
15
+
16
+
## Description
17
+
18
+
`demi_getsockopt()` gets the option specified by the `optname` argument, at the protocol level specified by the `level` argument, to the value pointed to by the `optval` argument for the socket I/O queue associated with queue descriptor specified by the `socketqd` argument.
19
+
20
+
Currently the following values for `level` are supported:
21
+
22
+
- `SOL_SOCKET` - Socket-level options.
23
+
24
+
Currently the following values for `option` are supported:
25
+
26
+
- `SO_LINGER` - Linger on/off and linger time in seconds, for queued, unsent data on `demi_close()`.
27
+
28
+
## Return Value
29
+
30
+
On success, zero is returned. On error, a positive error code is returned.
31
+
32
+
## Errors
33
+
34
+
On error, one of the following positive error codes is returned:
35
+
36
+
- `EBADF` - The specified `sockqd` is invalid.
37
+
- `EINVAL` - The specified `optval` is invalid.
38
+
- `EINVAL` - The specified `optlen` is invalid.
39
+
- `ENOPROTOOPT` - The specified `optname` is not supported.
40
+
- `ENOTSUP` - The specified `level` is not supported.
41
+
42
+
## Disclaimer
43
+
44
+
Any behavior that is not documented in this manual page is unintentional and should be reported.
0 commit comments