Lingua

IWebSocketInformation.Protocol Proprietà

Definizione

Ottiene il protocollo secondario WebSocket negoziato con il server durante l'handshake WebSocket in un oggetto IWebSocket .

public:
 property Platform::String ^ Protocol { Platform::String ^ get(); };
winrt::hstring Protocol();
public string Protocol { get; }
var string = iWebSocketInformation.protocol;
Public ReadOnly Property Protocol As String

Valore della proprietà

String

Platform::String

winrt::hstring

Protocollo secondario negoziato con il server durante l'handshake WebSocket.

Commenti

Sia un client WebSocket che un server WebSocket possono supportare più protocolli secondari. Durante l'handshake WebSocket, il server selezionerà uno dei sottoprotezioni supportati a vicenda e risponderà nell'intestazione "Sec-WebSocket-Protocol". La proprietà Protocol conterrà la stringa di protocollo secondaria selezionata.

Prima che IWebSocket sia connesso, questa proprietà è null.

Si applica a