MessageWebSocketControl.MaxMessageSize Property

The maximum message size, in bytes, for a WebSocket message to be configured on the MessageWebSocket object.

Syntax

public:
property uint32 MaxMessageSize {
         uint32 get ();
         void set (uint32 value);
}  

Property value

Type: uint32 

  The maximum message size, in bytes, to be configured on the MessageWebSocket object.

Remarks

The MaxMessageSize property is used to configure the maximum size of a WebSocket message on a MessageWebSocket object. If a message exceeds this size, MessageReceived event will be raised on the MessageWebSocket object, and the GetDataReader or GetDataStream method on the MessageWebSocketMessageReceivedEventArgs callback parameter will fail (with an error code indicating that the maximum message size has been exceeded).

The default value for the MaxMessageSize property is INFINITE.

The MaxMessageSize property can only be set before calling the ConnectAsync method on the MessageWebSocket object. If the MessageWebSocket is already connected, an attempt to set this property will return an error.

Requirements

Namespace: Windows.Networking.Sockets

Metadata: windows.winmd

See also

Reference

MessageWebSocketControl Class

MessageWebSocketControl Members

Windows.Networking.Sockets Namespace