Udostępnij za pośrednictwem


MessageWebSocketMessageReceivedEventArgs.MessageType Property

Definition

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

public:
 property SocketMessageType MessageType { SocketMessageType get(); };
SocketMessageType MessageType();
public SocketMessageType MessageType { get; }
var socketMessageType = messageWebSocketMessageReceivedEventArgs.messageType;
Public ReadOnly Property MessageType As SocketMessageType

Property Value

The type of the message received.

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.

Applies to

See also