Socket.GetRawSocketOption(Int32, Int32, Span<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.
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
Parameters
- optionLevel
- Int32
The platform-defined option level.
- optionName
- Int32
The platform-defined option name.
Returns
The number of bytes written into optionValue
for a successfully retrieved value.
Exceptions
The Socket has been closed.
An error occurred when attempting to access the socket.
Remarks
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.
Applies to
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈