AddServerLogic.cs 566 B

12345678910111213141516
  1. using NetCore;
  2. using NetCore.Protocol.MemoryPack;
  3. using NetServerCore.Attribute;
  4. namespace NetServer.InternalServer.Logic;
  5. [LogicEnrollAtt((int)InternalSendType.AddServer, 1)]
  6. public class AddServerLogic : InternalLogicBasic
  7. {
  8. public override void Logic(InternalMemoryRequst internalMemoryRequst, IConnection iConnection)
  9. {
  10. ServerType serverType = internalMemoryRequst.ServerType;
  11. ServerLinkMnager.Instance.AddServerConnection(serverType, iConnection);
  12. Console.WriteLine("添加一个服务器"+iConnection.ConnectionId);
  13. }
  14. }