MessageWebSocket.Control | control property

Applies to Windows and Windows Phone

Gets socket control data on a MessageWebSocket object.

Syntax


var control = messageWebSocket.control;

Property value

Type: MessageWebSocketControl

Socket control data on a MessageWebSocket object.

Remarks

The Control property gets the MessageWebSocketControl instance associated with a MessageWebSocket object.

A MessageWebSocketControl object is automatically created with the parent MessageWebSocket object. The MessageWebSocketControl instance can then be used to get or set control data used by the MessageWebSocket object. These properties on the MessageWebSocketControl instance include the following:

The SupportedProtocols property gets the value of this property and can be called at any time.

The MessageType property can be changed at any time before or after the MessageWebSocket is connected. This allows an app to switch between binary and UTF-8 messages when needed.

The OutboundBufferSizeInBytes property must be set before the MessageWebSocket is connected. Setting this property after the MessageWebSocket is connected has no effect.

Changes to any other property values on the MessageWebSocketControl must be set before the MessageWebSocket is connected. As a result if you need to make changes to the MaxMessageSize, OutboundBufferSizeInBytes, ProxyCredential, or ServerCredential properties, then these changes must occur before a successful call to the ConnectAsync method on the MessageWebSocket.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

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

See also

Other resources
How to use advanced WebSocket controls
Reference
MaxMessageSize
MessageType
MessageWebSocket
MessageWebSocketControl
OutboundBufferSizeInBytes
ProxyCredential
SupportedProtocols

 

 

Show:
© 2014 Microsoft