Skip to main content

IpGetSocketOption

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

Method Syntax

Method Syntax

Description

The function reads the value of the given socket option. The function is dependent on the selected stack.

Parameters

  • socket: The socket handle.
  • level: The level at which the option is defined, e.g. SOL_SOCKET (0xFFFF). See Socket Options for all supported socket levels.
  • name: The socket option name to be read, e.g. SO_BROADCAST (0x0020). See Socket Options for all supported socket options.
  • value: The value of the socket option will be returned in this variable.

Return Values

  • 0: The function completed successfully.
  • WSA_INVALID_PARAMETER (87): The specified socket index was invalid.
  • SOCKET_ERROR (-1): The function failed. Call IpGetLastSocketError to get a more specific error code.

Example