GetSocketOption Method (SocketOptionLevel, SocketOptionName, Byte)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Returns the specified Socket option setting, represented as a byte array.
Assembly: System (in System.dll)
'Declaration Public Sub GetSocketOption ( _ optionLevel As SocketOptionLevel, _ optionName As SocketOptionName, _ val As Byte() _ )
When the length of the val array is smaller than the number of bytes required to store the value of the specified Socket option, GetSocketOption will throw a SocketException. If you receive a SocketException, use the SocketException..::..ErrorCode property to obtain the specific error code. After you have obtained this code, refer to the Windows Sockets version 2 API error code documentation in the MSDN library for a detailed description of the error. Use this overload for any sockets that are represented by Boolean values or integers.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.