I​Web​Socket​Control I​Web​Socket​Control I​Web​Socket​Control I​Web​Socket​Control Interface

Definition

Provides socket control data on an IWebSocket object.

public : interface IWebSocketControlpublic interface IWebSocketControlPublic Interface IWebSocketControl// You can use this interface in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

OutboundBufferSizeInBytes OutboundBufferSizeInBytes OutboundBufferSizeInBytes OutboundBufferSizeInBytes

The size, in bytes, of the send buffer to be used for sending data on an IWebSocket object.

public : unsigned short OutboundBufferSizeInBytes { get; set; }public uint OutboundBufferSizeInBytes { get; set; }Public ReadWrite Property OutboundBufferSizeInBytes As uint// You can use this property in JavaScript.
Value
unsigned short uint uint uint

The size, in bytes, of the send buffer to be used for sending data.

Remarks

This property sets the value of the SO_SNDBUF socket option on the TCP socket used by the IWebSocket. The default value is the local computer's default send buffer size. This value varies based on the system memory size. For more detailed information, see SOL_SOCKET Socket Options in the Windows Sockets documentation.

For most apps, this property should not be set since this disables TCP send auto-tuning by the system on this IWebSocket object. With TCP send auto-tuning disabled, network throughput is often worse especially on a connections with high latency. So this property should only be used in very specific situations.

This property must be set before the IWebSocket connection is made. It will not have any effect if set after the connection has been initiated.

See Also

ProxyCredential ProxyCredential ProxyCredential ProxyCredential

The credential to use to authenticate to the proxy server through HTTP header authentication using an IWebSocket object.

public : PasswordCredential ProxyCredential { get; set; }public PasswordCredential ProxyCredential { get; set; }Public ReadWrite Property ProxyCredential As PasswordCredential// You can use this property in JavaScript.
Value
PasswordCredential PasswordCredential PasswordCredential PasswordCredential

The credential to use to authenticate to the proxy server through HTTP header authentication.

Remarks

The ProxyCredential property must be set before calling the ConnectAsync method on the IWebSocket object. An attempt to set the ProxyCredential property after calling the ConnectAsync method will result in an error.

ServerCredential ServerCredential ServerCredential ServerCredential

The credential to use to authenticate to the WebSocket server through HTTP header authentication using an IWebSocket object.

public : PasswordCredential ServerCredential { get; set; }public PasswordCredential ServerCredential { get; set; }Public ReadWrite Property ServerCredential As PasswordCredential// You can use this property in JavaScript.
Value
PasswordCredential PasswordCredential PasswordCredential PasswordCredential

The credential to use to authenticate to the WebSocket server through HTTP header authentication.

Remarks

The ServerCredential property must be set before calling the ConnectAsync method on the IWebSocket object. An attempt to set the ServerCredential property after calling the ConnectAsync method will result in an error.

SupportedProtocols SupportedProtocols SupportedProtocols SupportedProtocols

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 : IVector<string> SupportedProtocols { get; }public IList<string> SupportedProtocols { get; }Public ReadOnly Property SupportedProtocols As IList<string>// You can use this property in JavaScript.
Value
IVector<PlatForm::String> IList<string> IList<string> IList<string>

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.

See Also