Sets the specified option to the specified value.
[Visual Basic] Overloads Public Function SetSockOpt( _ ByVal optionLevel As Integer, _ ByVal optionName As Integer, _ ByVal optionValue As Object _ ) As Boolean [C#] public bool SetSockOpt( int optionLevel, int optionName, object optionValue ); [C++] public: bool SetSockOpt( int optionLevel, int optionName, Object* optionValue ); [JScript] public function SetSockOpt( optionLevel : int, optionName : int, optionValue : Object ) : Boolean;
true if the option was successfully set; otherwise, returns false.
Exception Type | Condition |
---|---|
ArgumentException | The object specified by optionValue is not an instance of LingerOption or MulticastOption. |
Socket Class | Socket Members | System.Net.Sockets Namespace | Socket.SetSockOpt Overload List