RouterNode.cs 948 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 IPEndPoint SyncIpEndPoint;
  16. public IKcpTransport KcpTransport;
  17. public uint OuterConn
  18. {
  19. get
  20. {
  21. return (uint)this.Id;
  22. }
  23. }
  24. public uint InnerConn;
  25. public uint ConnectId;
  26. public long LastRecvOuterTime;
  27. public long LastRecvInnerTime;
  28. public int RouterSyncCount;
  29. public int SyncCount;
  30. #region 限制外网消息数量,一秒最多50个包
  31. public long LastCheckTime;
  32. public int LimitCountPerSecond;
  33. #endregion
  34. public RouterStatus Status;
  35. }
  36. }