Function sockopt

Source
pub const unsafe fn sockopt<T>(level: int, optname: int) -> DirectSockOpt<T>
Expand description

Constructs a new “simple” socket option whose safe-facing argument type is the same as its internal type and whose level and option name are fixed.

Types used with this implementation should typically be repr(C) and designed to exactly match the layout of the option’s kernel structure.

Safety: Callers must ensure that the given level and optname are valid and that type T is the type that the corresponding option expects.