Class MessageEventArgs
Represents the event data for the OnMessage event.
Inheritance
EventArgs
MessageEventArgs
Namespace: Mars.Common.Socket
Assembly: Mars.Common.dll
Syntax
public class MessageEventArgs : EventArgs
Remarks
That event occurs when the WebSocket receives
a message or a ping if the EmitOnPing
property is set to true
.
If you would like to get the message data, you should access the Data or RawData property.
Properties
Data
Gets the message data as a .
Declaration
public string Data { get; }
Property Value
Type | Description |
---|---|
System.String |
A |
IsBinary
Gets a value indicating whether the message type is binary.
Declaration
public bool IsBinary { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
true if the message type is binary; otherwise, false .
|
IsPing
Gets a value indicating whether the message type is ping.
Declaration
public bool IsPing { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
true if the message type is ping; otherwise, false .
|
IsText
Gets a value indicating whether the message type is text.
Declaration
public bool IsText { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
true if the message type is text; otherwise, false .
|
RawData
Gets the message data as an array of .
Declaration
public byte[] RawData { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
An array of |