23 lines
585 B
C#
23 lines
585 B
C#
namespace Passer.Control.Core {
|
|
|
|
public class ClientMsg : IMessage {
|
|
public const byte Id = 0xA0;
|
|
public const byte length = 2;
|
|
public byte networkId;
|
|
|
|
public ClientMsg(byte networkId) {
|
|
this.networkId = networkId;
|
|
}
|
|
|
|
public ClientMsg(byte[] buffer) {
|
|
this.networkId = buffer[1];
|
|
}
|
|
|
|
public override byte Serialize(ref byte[] buffer) {
|
|
byte ix = 0;
|
|
buffer[ix++] = ClientMsg.Id;
|
|
buffer[ix++] = networkId;
|
|
return ClientMsg.length;
|
|
}
|
|
}
|
|
} |