This topic has not yet been rated - Rate this topic

StreamWebSocketControl class

Applies to Windows and Windows Phone

Provides socket control data on a StreamWebSocket object.

Syntax


var streamWebSocketControl = StreamWebSocket.Control;

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Members

The StreamWebSocketControl class has these types of members:

Methods

The StreamWebSocketControl class inherits methods from the Object class (C#/VB/C++).

Properties

The StreamWebSocketControl class has these properties.

PropertyAccess typeDescription

NoDelay

Read/writeA value that indicates whether the Nagle algorithm is used on a StreamWebSocket object.

OutboundBufferSizeInBytes

Read/writeThe size, in bytes, of the send buffer to be used for sending data on a StreamWebSocket object.

ProxyCredential

Read/writeThe credential to use to authenticate to the proxy server through HTTP header authentication using a StreamWebSocket object.

ServerCredential

Read/writeThe credential to use to authenticate to the WebSocket server through HTTP header authentication using a StreamWebSocket object.

SupportedProtocols

Read-onlyGets 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.

 

Remarks

A StreamWebSocketControl object is automatically created with the parent StreamWebSocket object. The StreamWebSocket.Control property provides access to the associated StreamWebSocketControl object.

The following example creates a StreamWebSocket, and then demonstrates how to set the StreamWebSocketControl.NoDelay property to false. (Other properties may be set in a similar manner.) After this is done, the app can connect the StreamWebSocket.


var clientWebSocket = new Windows.Networking.Sockets.StreamWebSocket();

// Get the current setting for this option
// This isn't required, but it shows how to get the current setting
var currentSetting = clientWebSocket.control.noDelay; 

// Set noDelay to false so that the Nagle algorithm is not disabled
clientWebSocket.control.noDelay = false;
   
// Now you can call the ConnectAsync method to connect the StreamWebSocket.


For more information about using StreamWebSocketControl, see How to use advanced WebSocket controls.

Requirements

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

Metadata

Windows.winmd

DLL

Windows.Networking.dll

Capabilities

internetClient
privateNetworkClientServer

See also

StreamWebSocket
How to use advanced WebSocket controls

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.