ISocket.setsockopt

Sets the value of a socket option, using the value data in src. The actual value data type and length depends on the particular option.

class ISocket
int
setsockopt
(
int level
,,
const(void)[] src
)

Parameters

level int

socket option level

optname int

socket option name

src const(void)[]

value source buffer

Return Value

Type: int

0 on success or -1 on failure. On failure errno is set appropriately.

Errors: EBADF - The argument sockfd is not a valid descriptor.

EFAULT - src is not in a valid part of the process address space.

EINVAL - src.length does not match the expected value length.

ENOPROTOOPT - The option is unknown at the level indicated.

ENOTSOCK - The argument sockfd is a file, not a socket.

Meta