MessageInfo.cs 517 B

123456789101112131415161718192021222324252627
  1. namespace Model
  2. {
  3. public class MessageInfo
  4. {
  5. public ushort Opcode { get; }
  6. public byte[] MessageBytes { get; }
  7. public int Offset { get; }
  8. public uint RpcId { get; }
  9. public object Message { get; set; }
  10. public MessageInfo(ushort opcode, byte[] messageBytes, int offset, uint rpcId)
  11. {
  12. this.Opcode = opcode;
  13. this.MessageBytes = messageBytes;
  14. this.Offset = offset;
  15. this.RpcId = rpcId;
  16. }
  17. public int Count
  18. {
  19. get
  20. {
  21. return this.MessageBytes.Length - this.Offset;
  22. }
  23. }
  24. }
  25. }