Mentalis.org Security Library documentation

VirtualSocket.GetSocketOption Method (SocketOptionLevel, SocketOptionName, Byte[])

Gets the specified VirtualSocket option setting.

[Visual Basic]
Overridable Overloads Public Sub GetSocketOption( _
   ByVal optionLevel As SocketOptionLevel, _
   ByVal optionName As SocketOptionName, _
   ByVal optionValue As Byte() _
)
[C#]
public virtual void GetSocketOption(
   SocketOptionLevel optionLevel,
   SocketOptionName optionName,
   byte[] optionValue
);

Parameters

optionLevel
One of the SocketOptionLevel values.
optionName
One of the SocketOptionName values.
optionValue
The buffer that is to receive the option setting.

Remarks

Socket options determine the behavior of the current Socket. Upon successful completion of this method, the array specified by the optionValue parameter contains the value of the specified Socket option. When the length of the optionValue array is smaller than the number of bytes required to store the value of the specified Socket option, a SocketException is thrown.

Exceptions

Exception TypeCondition
SocketExceptionAn operating system error occurs while accessing the VirtualSocket.
ObjectDisposedExceptionThe VirtualSocket has been closed.

See Also

VirtualSocket Class | Org.Mentalis.Security.Ssl Namespace | VirtualSocket.GetSocketOption Overload List