RouterComponent.cs 775 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Net;
  4. using System.Net.Sockets;
  5. namespace ET.Server
  6. {
  7. [ComponentOf(typeof(Scene))]
  8. public class RouterComponent: Entity, IAwake<IPEndPoint, string>, IDestroy, IUpdate
  9. {
  10. public Socket OuterSocket;
  11. public Socket InnerSocket;
  12. public EndPoint IPEndPoint = new IPEndPoint(IPAddress.Any, 0);
  13. public byte[] Cache = new byte[1500];
  14. public Dictionary<uint, RouterNode> ConnectIdNodes = new Dictionary<uint, RouterNode>();
  15. // 已经连接成功的,虽然跟id一样,但是没有经过验证的不会加到这里
  16. public Dictionary<uint, RouterNode> OuterNodes = new Dictionary<uint, RouterNode>();
  17. public long LastCheckTime = 0;
  18. }
  19. }