Class GeneralMessage
Represents a general signaling message exchanged between WebRTC peers via the signaling server.
public class GeneralMessage
- Inheritance
-
GeneralMessage
- Inherited Members
Constructors
GeneralMessage()
public GeneralMessage()
Properties
Data
Gets the data payload as a JSON string, or null if the data is not a JSON object.
[JsonIgnore]
public string Data { get; }
Property Value
DataInt
Gets or sets the raw data payload of the message.
[JsonPropertyName("data")]
public object DataInt { get; set; }
Property Value
DataType
Gets or sets the data type identifier of this message.
[JsonPropertyName("data-type")]
public string DataType { get; set; }
Property Value
From
Gets or sets the sender peer identifier.
[JsonPropertyName("from")]
public long From { get; set; }
Property Value
PeerList
Gets the data payload deserialized as a list of PeerDescriptor instances, or null if the data is not a JSON array.
[JsonIgnore]
public List<PeerDescriptor> PeerList { get; }
Property Value
Subtype
Gets or sets the message subtype, or null if not specified.
[JsonPropertyName("subtype")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string Subtype { get; set; }
Property Value
To
Gets or sets the recipient peer identifier.
[JsonPropertyName("to")]
public long To { get; set; }
Property Value
Methods
Deserialize(string)
Deserializes a JSON string into a GeneralMessage instance.
public static GeneralMessage Deserialize(string json)
Parameters
jsonstringThe JSON string to deserialize.
Returns
- GeneralMessage
The deserialized GeneralMessage, or
nullif deserialization fails.
Serialize()
Serializes this instance to a JSON string.
public string Serialize()
Returns
- string
The JSON string representation of this message.