StreamWebSocketInformation
StreamWebSocketInformation
StreamWebSocketInformation
StreamWebSocketInformation
Class
Definition
Provides socket information on a StreamWebSocket object.
public : sealed class StreamWebSocketInformation : IWebSocketInformation, IWebSocketInformation2public sealed class StreamWebSocketInformation : IWebSocketInformation, IWebSocketInformation2Public NotInheritable Class StreamWebSocketInformation Implements IWebSocketInformation, IWebSocketInformation2// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
privateNetworkClientServer
internetClient
|
Remarks
StreamWebSocketInformation can be called any time after the StreamWebSocket has been created.
A StreamWebSocketInformation object is automatically created with the parent StreamWebSocket object. The StreamWebSocket.Information property provides access to the associated StreamWebSocketInformation object.
Properties
BandwidthStatistics BandwidthStatistics BandwidthStatistics BandwidthStatistics
Gets bandwidth information for network data transfer on a StreamWebSocket object.
Note that the returned statistics are based on extended TCP statistics, which are enabled by default on Client versions of Windows, but disabled by default for performance reasons on Server versions of Windows. If extended TCP statistics are not available, all returned numerical statistics are set to 0, and boolean statistics are set to false.
public : BandwidthStatistics BandwidthStatistics { get; }public BandwidthStatistics BandwidthStatistics { get; }Public ReadOnly Property BandwidthStatistics As BandwidthStatistics// You can use this property in JavaScript.
Bandwidth information for network data transfer on a StreamWebSocket object.
- See Also
LocalAddress LocalAddress LocalAddress LocalAddress
Gets the IP address associated with a StreamWebSocket object.
public : HostName LocalAddress { get; }public HostName LocalAddress { get; }Public ReadOnly Property LocalAddress As HostName// You can use this property in JavaScript.
The IP address associated with a StreamWebSocket object.
- See Also
Protocol Protocol Protocol Protocol
Gets the WebSocket sub-protocol negotiated with the server during WebSocket handshake on a StreamWebSocket object.
public : PlatForm::String Protocol { get; }public string Protocol { get; }Public ReadOnly Property Protocol As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The sub-protocol negotiated with the server during WebSocket handshake.
Remarks
Both a WebSocket client and a WebSocket server may support multiple sub-protocols. During the WebSocket handshake, the server will select one of the sub-protocols from the mutually supported sub-protocols and reply in the "Sec-WebSocket-Protocol" header. The Protocol property will contain the selected sub-protocol string.
Before the StreamWebSocket is connected, this property is null.
- See Also
ServerCertificate ServerCertificate ServerCertificate ServerCertificate
Gets the certificate provided by the server when a secure WebSocket connection has been established.
public : Certificate ServerCertificate { get; }public Certificate ServerCertificate { get; }Public ReadOnly Property ServerCertificate As Certificate// You can use this property in JavaScript.
The server certificate.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
| Capabilities |
privateNetworkClientServer
internetClient
|
Remarks
By the time the server certificate is available through this property, the SSL connection has already been established.
If you wish to inspect the server certificate during the connection process in order to perform custom validation, you should register a handler for the StreamWebSocket.ServerCustomValidationRequested event, and perform your custom server validation in that handler.
If you merely wish to ignore certain classes of error when the server certificate is validated (for example, you are using a self-signed certificate and wish to ignore the validation error caused by this condition) you can use the IgnorableServerCertificateErrors property to ignore the relevant classes of errors.
ServerCertificateErrors ServerCertificateErrors ServerCertificateErrors ServerCertificateErrors
Gets a list of the errors that occurred while establishing a secure StreamWebSocket connection.
public : IVectorView<ChainValidationResult> ServerCertificateErrors { get; }public IReadOnlyList<ChainValidationResult> ServerCertificateErrors { get; }Public ReadOnly Property ServerCertificateErrors As IReadOnlyList<ChainValidationResult>// You can use this property in JavaScript.
- Value
- IVectorView<ChainValidationResult> IReadOnlyList<ChainValidationResult> IReadOnlyList<ChainValidationResult> IReadOnlyList<ChainValidationResult>
A list of values describing secure connection errors.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
| Capabilities |
privateNetworkClientServer
internetClient
|
ServerCertificateErrorSeverity ServerCertificateErrorSeverity ServerCertificateErrorSeverity ServerCertificateErrorSeverity
Gets the category of an error that occurred making an SSL connection with a StreamWebSocket server.
public : SocketSslErrorSeverity ServerCertificateErrorSeverity { get; }public SocketSslErrorSeverity ServerCertificateErrorSeverity { get; }Public ReadOnly Property ServerCertificateErrorSeverity As SocketSslErrorSeverity// You can use this property in JavaScript.
The category of error on an SSL connection.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
| Capabilities |
privateNetworkClientServer
internetClient
|
Remarks
SSL server errors should only be ignored in advanced scenarios. Disregarding server certificate errors when this property is either Ignorable or Fatal may result in the loss of privacy or integrity of the content passed over the SSL session.
ServerIntermediateCertificates ServerIntermediateCertificates ServerIntermediateCertificates ServerIntermediateCertificates
Gets the intermediate certificates sent by the server during SSL negotiation when making an SSL connection with a StreamWebSocket server.
public : IVectorView<Certificate> ServerIntermediateCertificates { get; }public IReadOnlyList<Certificate> ServerIntermediateCertificates { get; }Public ReadOnly Property ServerIntermediateCertificates As IReadOnlyList<Certificate>// You can use this property in JavaScript.
- Value
- IVectorView<Certificate> IReadOnlyList<Certificate> IReadOnlyList<Certificate> IReadOnlyList<Certificate>
The set of certificates sent by the server during SSL negotiation.
| Device family |
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v3)
|
| Capabilities |
privateNetworkClientServer
internetClient
|
Remarks
This property returns the intermediate server certificates used when making an SSL connection with a WebSockets server. These certificates are provided by the server during the SSL connection negotiation. The properties on the Certificate objects in the returned vector can be used to get detailed information on the certificates.
By the time the list of intermediate certificates is available through this property, the SSL connection has already been established. If you wish to inspect the server certificates during the connection process in order to perform custom validation, you should register a handler for the StreamWebSocket.ServerCustomValidationRequested event, and perform your custom server validation in that handler, using the WebSocketServerCustomValidationRequestedEventArgs instance passed to your event handler to inspect the intermediate certificates.