예제 #1
0
        public static void Main()
        {
            ServiceCollection service = new ServiceCollection();

            ConfigureServices(service);
            ServiceProvider       serviceProvider      = service.BuildServiceProvider();
            IServerCommandHandler serverCommandHandler = new ServerCommandHandler(serviceProvider);
            IServer          server           = new CommandResponseProtocol.CRServer.Server(serverCommandHandler);
            RunPropertyModel runPropertyModel = InputAdress();

            server.Run(runPropertyModel);
        }
예제 #2
0
 public void Run(RunPropertyModel runPropertyModel)
 {
     _tcpServer = new TCPServer(runPropertyModel.IPAddress, runPropertyModel.Port);
     _tcpServer.RecieveDataEvent += RecieveClientCommand;
     _tcpServer.Start(runPropertyModel.ClientsCount);
 }