Socket.SetRawSocketOption(Int32, Int32, ReadOnlySpan<Byte>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets a socket option value using platform-specific level and name identifiers.
public:
void SetRawSocketOption(int optionLevel, int optionName, ReadOnlySpan<System::Byte> optionValue);
public void SetRawSocketOption (int optionLevel, int optionName, ReadOnlySpan<byte> optionValue);
member this.SetRawSocketOption : int * int * ReadOnlySpan<byte> -> unit
Public Sub SetRawSocketOption (optionLevel As Integer, optionName As Integer, optionValue As ReadOnlySpan(Of Byte))
Parameters
- optionLevel
- Int32
The platform-defined option level.
- optionName
- Int32
The platform-defined option name.
- optionValue
- ReadOnlySpan<Byte>
The value to which the option should be set.
Exceptions
The Socket has been closed.
An error occurred when attempting to access the socket.
Remarks
In general, the SetSocketOption
method should be used whenever setting a Socket option.
The SetRawSocketOption(Int32, Int32, ReadOnlySpan<Byte>) method should be used only when SocketOptionLevel and SocketOptionName do not expose the required option.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om