RouterNode.cs 906 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System.Net;
  2. namespace ET.Server
  3. {
  4. public enum RouterStatus
  5. {
  6. Sync,
  7. Msg,
  8. }
  9. [ChildOf(typeof(RouterComponent))]
  10. public class RouterNode: Entity, IDestroy, IAwake
  11. {
  12. public string InnerAddress;
  13. public IPEndPoint InnerIpEndPoint;
  14. public IPEndPoint OuterIpEndPoint;
  15. public IKcpTransport KcpTransport;
  16. public uint OuterConn
  17. {
  18. get
  19. {
  20. return (uint)this.Id;
  21. }
  22. }
  23. public uint InnerConn;
  24. public uint ConnectId;
  25. public long LastRecvOuterTime;
  26. public long LastRecvInnerTime;
  27. public int RouterSyncCount;
  28. public int SyncCount;
  29. #region 限制外网消息数量,一秒最多50个包
  30. public long LastCheckTime;
  31. public int LimitCountPerSecond;
  32. #endregion
  33. public RouterStatus Status;
  34. }
  35. }