diff --git a/Messages.cs b/Messages.cs index d671ec4..cd56d8c 100644 --- a/Messages.cs +++ b/Messages.cs @@ -47,31 +47,14 @@ namespace Passer.Control.Core { public const byte length = 2; public byte networkId; - public ClientMsg(byte networkId) { - this.networkId = networkId; - } public ClientMsg(byte[] buffer) : base(buffer) { } - public override byte Serialize(ref byte[] buffer) { - byte ix = 0; - buffer[ix++] = ClientMsg.Id; - buffer[ix++] = networkId; - return ix; - } public override void Deserialize(byte[] buffer) { base.Deserialize(buffer); uint ix = 0; networkId = buffer[ix]; } - public static bool Send(Participant client, byte networkId) { - ClientMsg msg = new(networkId); - return SendMsg(client, msg); - } - //public static bool Publish(Participant client, byte networkId) { - // ClientMsg msg = new(networkId); - // return PublishMsg(client, msg); - //} public static async Task Receive(Stream dataStream, Participant client, byte packetSize) { if (packetSize != length) return false;