Socket.getOption

int getOption(SocketOptionLevel level, SocketOption option, scope void[] result) @trusted

Get a socket option.

Returns

The number of bytes written to result.

The length, in bytes, of the actual result - very different from getsockopt()

int getOption(SocketOptionLevel level, SocketOption option, out int32_t result) @trusted

Common case of getting integer and boolean options.

int getOption(SocketOptionLevel level, SocketOption option, out Linger result) @trusted

Get the linger option.

void getOption(SocketOptionLevel level, SocketOption option, out Duration result) @trusted

Get a timeout (duration) option.