Class MessageEventArgs
Inheritance
Inherited Members
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
| Improve this Doc View SourceData
Declaration
public string Data { get; }
Property Value
Type | Description |
---|---|
System.String | A System.String that represents the message data if its type is text or ping and if decoding it to a string has successfully done; otherwise, null. |
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.
IsBinary
Declaration
public bool IsBinary { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
true if the message type is binary; otherwise, false .
|
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.
IsPing
Declaration
public bool IsPing { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
true if the message type is ping; otherwise, false .
|
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.
IsText
Declaration
public bool IsText { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
true if the message type is text; otherwise, false .
|
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.
RawData
Declaration
public byte[] RawData { get; }
Property Value
Type | Description |
---|---|
System.Byte[] | An array of System.Byte that represents the message data. |
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.