Socket.SetRawSocketOption(Int32, Int32, ReadOnlySpan<Byte>) Método
Definição
Define um valor da opção de soquete usando identificadores de nome e de nível específicos da plataforma.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))
Parâmetros
- optionLevel
- Int32
O nível da opção definido pela plataforma.The platform-defined option level.
- optionName
- Int32
O nome da opção definido pela plataforma.The platform-defined option name.
- optionValue
- ReadOnlySpan<Byte>
O valor para o qual a opção deve ser definida.The value to which the option should be set.
Exceções
Ocorreu um erro ao tentar acessar o soquete.An error occurred when attempting to access the socket.
Comentários
Em geral, o SetSocketOption método deve ser usado sempre que uma Socket opção é definida.In general, the SetSocketOption method should be used whenever setting a Socket option.
O SetRawSocketOption(Int32, Int32, ReadOnlySpan<Byte>) método deve ser usado somente quando SocketOptionLevel e SocketOptionName não expor a opção necessária.The SetRawSocketOption(Int32, Int32, ReadOnlySpan<Byte>) method should be used only when SocketOptionLevel and SocketOptionName do not expose the required option.