Socket.GetRawSocketOption(Int32, Int32, Span<Byte>) メソッド
定義
プラットフォーム固有のレベル識別子と名前識別子を使用して、ソケット オプションの値を取得します。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 span into which the retrieved option value should be stored.
戻り値
正常に取得された値に対して optionValue
に書き込まれたバイト数。The number of bytes written into optionValue
for a successfully retrieved value.
例外
ソケットへのアクセスを試行しているときにエラーが発生しました。An error occurred when attempting to access the socket.
注釈
一般に、 GetSocketOption
オプションを取得するときは常にメソッドを使用する必要があり Socket ます。In general, the GetSocketOption
method should be used whenever getting a Socket option.
GetRawSocketOption(Int32, Int32, Span<Byte>) メソッドは SocketOptionLevel 、 SocketOptionName 必要なオプションを公開していない場合にのみ使用してください。GetRawSocketOption(Int32, Int32, Span<Byte>) method should be used only when SocketOptionLevel and SocketOptionName do not expose the required option.