Socket.getOption

Get a socket option.

  1. int getOption(SocketOptionLevel level, SocketOption option, void[] result)
  2. int getOption(SocketOptionLevel level, SocketOption option, size_t result)
    class Socket
    const @trusted @nogc
    int
    getOption
    (
    SocketOptionLevel level
    ,
    SocketOption option
    ,
    out size_t result
    )
  3. int getOption(SocketOptionLevel level, SocketOption option, Linger result)
  4. int getOption(SocketOptionLevel level, SocketOption option, Duration result)

Parameters

level SocketOptionLevel

Protocol level at that the option exists.

option SocketOption

Option.

result size_t

Buffer to save the result.

Return Value

Type: int

The number of bytes written to result.

Throws

$(D_PSYMBOL SocketException) on error.

Meta