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); }
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; }