Signal.cs 607 B

1234567891011121314151617181920212223242526272829
  1. using TBL.CSharp.Game.Server.Utilities;
  2. namespace TBL.CSharp.Game.Server.Message;
  3. /// <summary>
  4. /// 服务器信号
  5. /// </summary>
  6. public readonly struct Signal
  7. {
  8. /// <summary>
  9. /// 目标地址
  10. /// </summary>
  11. public readonly SignalAddress TargetAddress;
  12. /// <summary>
  13. /// 信号数据
  14. /// </summary>
  15. public readonly ByteBlock Data;
  16. public Signal(SignalAddress targetAddress, ByteBlock data)
  17. {
  18. TargetAddress = targetAddress;
  19. Data = data;
  20. }
  21. public Signal(SignalAddress targetAddress) : this(targetAddress, ByteBlock.Empty)
  22. {
  23. }
  24. }