ActorMessageSender.cs 527 B

123456789101112131415161718192021222324252627
  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 ActorMessageSender : ComponentWithId
  8. {
  9. // actor的地址
  10. public IPEndPoint Address;
  11. public long ActorId;
  12. // 还没发送的消息
  13. public Queue<ActorTask> WaitingTasks = new Queue<ActorTask>();
  14. // 最近发送消息的时间
  15. public long LastSendTime;
  16. public TaskCompletionSource<ActorTask> tcs;
  17. public int FailTimes;
  18. public int MaxFailTimes;
  19. }
  20. }