Start() public method

public Start ( ) : void
return void
示例#1
0
        public IClientConnector Start(IApplication application, WebApplicationConfiguration additionalConfiguration = null)
        {
            var port     = additionalConfiguration?.Port ?? PortFinder.FindPort(5000);
            var hostname = additionalConfiguration?.Hostname ?? "localhost";

            _application = application;

            BaseAddress = $"http://{hostname}:{port}";

            var webSockets = new WebSocketsHandler();

            _commands = new CommandRunner(application);


            Client = new ClientConnector(webSockets, _commands.HandleJson)
            {
                WebSocketsAddress = $"ws://{hostname}:{port}"
            };

            startWebServer(hostname, port, webSockets);

#if DEBUG
            _watcher = new AssetFileWatcher(Client);
            _watcher.Start(_input);
#endif

            return(Client);
        }
        public IClientConnector Start(IApplication application)
        {
            var port = PortFinder.FindPort(5000);

            _application = application;

            BaseAddress = "http://localhost:" + port;

            var webSockets = new WebSocketsHandler();

            _commands = new CommandRunner(application);


            Client = new ClientConnector(webSockets, _commands.HandleJson)
            {
                WebSocketsAddress = $"ws://127.0.0.1:{port}"
            };

            startWebServer(port, webSockets);

#if DEBUG
            _watcher = new AssetFileWatcher(Client);
            _watcher.Start(_input);
#endif

            return(Client);
        }
示例#3
0
 public void Activate(IActivationLog log, IPerfTimer timer)
 {
     _watcher.Start();
 }
        public IClientConnector Start(IApplication application)
        {
            var port = PortFinder.FindPort(5000);

            _application = application;

            BaseAddress = "http://localhost:" + port;

            var webSockets = new WebSocketsHandler();

            _commands = new CommandRunner(application);


            Client = new ClientConnector(webSockets, _commands.HandleJson)
            {
                WebSocketsAddress = $"ws://127.0.0.1:{port}"
            };

            startWebServer(port, webSockets);

#if DEBUG
            _watcher = new AssetFileWatcher(Client);
            _watcher.Start();
#endif

            return Client;
        }