WebSocketOptions.SubProtocolSelector 属性

定义

获取或设置一个委托,该委托将在建立新的 WebSocket 时调用,以选择“Sec-WebSocket-Protocol”响应标头的值。 将使用客户端在“Sec-WebSocket-Protocol”请求标头中提供的协议列表调用委托。

public:
 property Func<System::Collections::Generic::IList<System::String ^> ^, System::String ^> ^ SubProtocolSelector { Func<System::Collections::Generic::IList<System::String ^> ^, System::String ^> ^ get(); void set(Func<System::Collections::Generic::IList<System::String ^> ^, System::String ^> ^ value); };
public Func<System.Collections.Generic.IList<string>,string> SubProtocolSelector { get; set; }
public Func<System.Collections.Generic.IList<string>,string>? SubProtocolSelector { get; set; }
member this.SubProtocolSelector : Func<System.Collections.Generic.IList<string>, string> with get, set
Public Property SubProtocolSelector As Func(Of IList(Of String), String)

属性值

注解

有关 WebSocket 握手的更多详细信息,请参阅 RFC 6455 第 1.3 节: https://tools.ietf.org/html/rfc6455#section-1.3

适用于