public async Task Start() { Util.SavePidToFile(_rpcConfig.PidFile); // Create Logger RpcUtils.CreateLogger(_rpcConfig.LogDirectory, _rpcConfig.LogName, _rpcConfig.LogTarget); var type = Type.GetType(_rpcConfig.PluginFullName); var plugin = (IPlugin)Activator.CreateInstance(type); if (!CheckUsage(_rpcConfig, plugin)) { // Load benchmark configuration var configuration = Util.ReadFile(_rpcConfig.PluginConfiguration); IList <IRpcClient> clients = null; if (plugin.NeedAgents(configuration)) { // Create rpc clients clients = CreateRpcClients(_rpcConfig.AgentList); // Check rpc connections await WaitRpcConnectSuccess(clients); } await plugin.Start(configuration, clients); } }
public async Task Start() { Util.SavePidToFile(_rpcConfig.PidFile); // Create Logger RpcUtils.CreateLogger(_rpcConfig.LogDirectory, _rpcConfig.LogName, _rpcConfig.LogTarget); // Create Rpc server var server = new RpcServer().Create(_rpcConfig.HostName, _rpcConfig.RpcPort); // Start Rpc server await server.Start(); }