Dela via


WebSocketOptions.SubProtocolSelector Property

Definition

Gets or sets a delegate that will be called when a new WebSocket is established to select the value for the 'Sec-WebSocket-Protocol' response header. The delegate will be called with a list of the protocols provided by the client in the 'Sec-WebSocket-Protocol' request header.

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)

Property Value

Remarks

See RFC 6455 section 1.3 for more details on the WebSocket handshake: https://tools.ietf.org/html/rfc6455#section-1.3

Applies to