MessageWebSocketMessageReceivedEventArgs MessageWebSocketMessageReceivedEventArgs MessageWebSocketMessageReceivedEventArgs MessageWebSocketMessageReceivedEventArgs Class

Provides data for a message received event on a MessageWebSocket.

Syntax

Declaration

public sealed class MessageWebSocketMessageReceivedEventArgspublic sealed class MessageWebSocketMessageReceivedEventArgsPublic NotInheritable Class MessageWebSocketMessageReceivedEventArgs

Remarks

The MessageWebSocketMessageReceivedEventArgs is used to receive data on a MessageWebSocket object.

A MessageReceived event occurs on a MessageWebSocket when a message is received. A MessageWebSocketMessageReceivedEventArgs instance is created when the MessageReceived event occurs.

Properties summary

Gets the type of the message received by a MessageWebSocket object.

Methods summary

Gets a DataReader object to read incoming data received from the remote network destination on a MessageWebSocket.

Gets an IInputStream object (a message represented as a sequential stream of bytes) from the remote network destination on a MessageWebSocket object.

Properties

  • MessageType
    MessageType
    MessageType
    MessageType

    Gets the type of the message received by a MessageWebSocket object.

    public SocketMessageType MessageType { get; }public SocketMessageType MessageType { get; }Public ReadOnly Property MessageType As SocketMessageType

    Property Value

    Remarks

    The WebSocket protocol currently supports two message types: UTF-8 and binary messages. If a message is sent as a binary message, it is up to the app to correctly interpret the binary data. Note that it is perfectly legal to return a binary message where the binary data is a UTF-8 string.

    The value of MessageType property is informative. It does not affect what methods are supported on the returned data by the MessageWebSocket object.

Methods

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.GCPressureAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute

Details

Assembly

Windows.Networking.Sockets.dll