public void Unpack(byte[] bytes) { Id = bytes[0]; var buffer = bytes; Username = StringPacker.UnpackString(bytes.Skip(1).ToArray(), out buffer); }
public void Unpack(byte[] bytes) { Id = bytes[0]; Accepted = bytes[1]; ReasonForDecline = StringPacker.UnpackString(bytes.Skip(2).ToArray(), out bytes); MotD = StringPacker.UnpackString(bytes, out bytes); WelcomeMessage = StringPacker.UnpackString(bytes, out bytes); ActiveUsers = StringPacker.UnpackList(bytes, out bytes); }
public void Unpack(byte[] bytes) { Id = bytes[0]; Username = StringPacker.UnpackString(bytes.Skip(1).ToArray(), out bytes); Message = StringPacker.UnpackString(bytes, out bytes); }