Class TextMessage
- Namespace
- SteamNetworkLib.Models
- Assembly
- SteamNetworkLib.dll
Represents a simple text message for P2P communication between players. This is the most basic message type for sending plain text content.
public class TextMessage : P2PMessage
- Inheritance
-
TextMessage
- Inherited Members
Constructors
TextMessage()
public TextMessage()
Properties
Content
Gets or sets the text content of the message.
public string Content { get; set; }
Property Value
MessageType
Gets the message type identifier for text messages.
public override string MessageType { get; }
Property Value
Methods
Deserialize(byte[])
Deserializes the text message from a byte array received over the network.
public override void Deserialize(byte[] data)
Parameters
data
byte[]The byte array containing the serialized message data.
Serialize()
Serializes the text message to a byte array for network transmission.
public override byte[] Serialize()
Returns
- byte[]
A byte array containing the serialized message data in JSON format.