Exemplo n.º 1
0
        public void StartMineAsync(IMinerData client, Guid workId)
        {
            string localJson = string.Empty, serverJson = string.Empty;

            if (workId != Guid.Empty)
            {
                localJson  = MinerStudioPath.ReadMineWorkLocalJsonFile(workId).Replace(NTKeyword.MinerNameParameterName, client.WorkerName);
                serverJson = MinerStudioPath.ReadMineWorkServerJsonFile(workId);
            }
            WorkRequest request = new WorkRequest {
                WorkId     = workId,
                LocalJson  = localJson,
                ServerJson = serverJson
            };

            RpcRoot.PostAsync <ResponseBase>(client.GetLocalIp(), NTKeyword.NTMinerDaemonPort, _daemonControllerName, nameof(INTMinerDaemonController.StartMine), request, null, timeountMilliseconds: 3000);
        }