ISocket.setsockoptVal

Calls setsockopt() to sets the value of a socket option to val.

Notes: - The actual value data type T depends on the particular option. Failure with EINVAL indicates that a type of the wrong size was used. - T = bool is internally substituted by int and therefore suitable for flag options.

class ISocket
int
setsockoptVal
(
T
)
(
int level
,,
T val
)

Parameters

level int

socket option level

optname int

socket option name

val T

option value

Return Value

Type: int

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

Meta