StreamWebSocketControl Class

Provides socket control data on a StreamWebSocket object.

Syntax

public ref class StreamWebSocketControl sealed : IWebSocketControl  

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.

Example

C++

using namespace Windows::Networking::Sockets;

StreamWebSocket^ clientWebSocket = ref new StreamWebSocket();

// Get the current setting for this option
// This isn't required, but it shows how to get the current setting 
bool 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

Namespace: Windows.Networking.Sockets

Metadata: windows.winmd

See also

Reference

StreamWebSocketControl Members

Windows.Networking.Sockets Namespace