Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.38 KB

messagewebsocketcontrol_messagetype.md

File metadata and controls

32 lines (20 loc) · 1.38 KB
-api-id -api-type
P:Windows.Networking.Sockets.MessageWebSocketControl.MessageType
winrt property

Windows.Networking.Sockets.MessageWebSocketControl.MessageType

-description

The WebSocket message type to be configured on a MessageWebSocket object for write operations.

-property-value

The WebSocket message type. The default is binary.

-remarks

A WebSocket message on the MessageWebSocket object can be either a binary message or a UTF-8 message. The default value is SocketMessageType.Binary.

This property only affects write operations on OutputStream. It does not affect the format of received messages.

The MessageType property can be changed at any time. This allows an app to switch between binary and UTF-8 messages when needed.

Before changing the MessageType on a bound or connected MessageWebSocket, any outgoing packets should first be flushed to ensure that all previously-written data is sent out with the previous message type

-examples

-see-also

How to use advanced WebSocket controls, MessageWebSocket, SocketMessageType