Start() public method

public Start ( ) : void
return void
Exemplo n.º 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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 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;
        }