2using System.Collections.Generic;
40 bool isWriteLine = data[1] == 1;
41 int messageSize = BitConverter.ToInt32(data, 2);
43 string message = Encoding.UTF8.GetString(data,
sizeof(
int) + 2, messageSize);
51 List<byte> data =
new List<byte>
56 byte[] message = Encoding.UTF8.GetBytes(
Message);
57 data.AddRange(BitConverter.GetBytes(message.Length));
58 data.AddRange(message);
60 return data.ToArray();
Implements the base class for all BadConsole Packets.
Gets sent to the client to write a message to the console.
bool IsWriteLine
Should a newline be appended?
override byte[] Serialize()
BadConsoleWritePacket(bool isWriteLine, string message)
Constructs a new BadConsoleWritePacket instance.
string Message
The Message to be written.
static new BadConsoleWritePacket Deserialize(byte[] data)
Deserializes the Packet.
Contains the network packets for the remote console.
BadConsolePacketType
The Packet Types.