Socket.GetRawSocketOption(Int32, Int32, Span<Byte>) Method
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.
Gets a socket option value using platform-specific level and name identifiers.
public:
int GetRawSocketOption(int optionLevel, int optionName, Span<System::Byte> optionValue);
public int GetRawSocketOption(int optionLevel, int optionName, Span<byte> optionValue);
member this.GetRawSocketOption : int * int * Span<byte> -> int
Public Function GetRawSocketOption (optionLevel As Integer, optionName As Integer, optionValue As Span(Of Byte)) As Integer
- optionLevel
- Int32
The platform-defined option level.
- optionName
- Int32
The platform-defined option name.
The number of bytes written into optionValue
for a successfully retrieved value.
The Socket has been closed.
An error occurred when attempting to access the socket.
In general, the GetSocketOption
method should be used whenever getting a Socket option.
GetRawSocketOption(Int32, Int32, Span<Byte>) method should be used only when SocketOptionLevel and SocketOptionName do not expose the required option.
Product | Versions |
---|---|
.NET | 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: