public AdminPortClient(ServerInfo serverInfo) { IAdminPacketService packetService = new AdminPacketServiceFactory().Create(); IAdminPortTcpClient tcpClient = new AdminPortTcpClient(new AdminPortTcpClientSender(packetService), new AdminPortTcpClientReceiver(packetService), new MyTcpClient()); Context = new AdminPortClientContext(tcpClient, "AdminPort", "1.0.0", serverInfo); eventFactory = new AdminEventFactory(); Init(tcpClient); }
internal AdminPortClient(IAdminPortTcpClient adminPortTcpClient, IAdminEventFactory eventFactory, ServerInfo serverInfo) { Context = new AdminPortClientContext(adminPortTcpClient, "AdminPort", "1.0.0", serverInfo); this.eventFactory = eventFactory; Init(adminPortTcpClient); }