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