ActorProxy.cs 526 B

12345678910111213141516171819202122232425
  1. using System.Collections.Generic;
  2. using System.Net;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. namespace ETModel
  6. {
  7. public sealed class ActorProxy : ComponentWithId
  8. {
  9. // actor的地址
  10. public IPEndPoint Address;
  11. // 还没发送的消息
  12. public Queue<ActorTask> WaitingTasks = new Queue<ActorTask>();
  13. // 最近发送消息的时间
  14. public long LastSendTime;
  15. public TaskCompletionSource<ActorTask> tcs;
  16. public CancellationTokenSource CancellationTokenSource;
  17. public int failTimes;
  18. }
  19. }