Jaa


IWebSocketControl.SupportedProtocols Property

Definition

Gets a collection that can be used to add a list of supported sub-protocols that will be advertised to the server during the connect handshake.

public:
 property IVector<Platform::String ^> ^ SupportedProtocols { IVector<Platform::String ^> ^ get(); };
IVector<winrt::hstring> SupportedProtocols();
public IList<string> SupportedProtocols { get; }
var iVector = iWebSocketControl.supportedProtocols;
Public ReadOnly Property SupportedProtocols As IList(Of String)

Property Value

IVector<String>

IList<String>

IVector<Platform::String>

IVector<winrt::hstring>

A collection that contains the WebSocket sub-protocols supported by the IWebSocket object.

Remarks

The SupportedProtocols property contains a collection of WebSocket sub-protocols supported by the IWebSocket object. Before calling the ConnectAsync method, additional supported sub-protocol strings can be added to this collection, which will be sent to the server in the "Sec-WebSocket-Protocol" header during the WebSocket handshake. The protocol chosen by the WebSocket server will then be exposed on the Protocol property.

An attempt to add a sub-protocol to this collection after a successful call to ConnectAsync method will result in an error. However, if the ConnectAsync method call or the connect operation completes with an error, an appl can update the collection stored in the SupportedProtocols property and retry the ConnectAsync method call.

Applies to

See also