Ejemplo n.º 1
0
            public override void Read()
            {
                try
                {
                    CGMinerCommandOutputs output = new CGMinerCommandOutputs();
                    string        result         = "";
                    TcpReaderUtil util           = new TcpReaderUtil(StatsLink, StatsPort);
                    result         = util.GetData("{\"command\":\"summary\"}");
                    output.Summary = result;

                    result      = util.GetData("{\"command\":\"devs\"}");
                    output.Devs = result;

                    result            = util.GetData("{\"command\":\"devdetails\"}");
                    output.Devdetails = result;

                    string str = new JavaScriptSerializer().Serialize(output);


                    NextLog = str;
                }
                catch (Exception e)
                {
                    throw;
                }
            }
Ejemplo n.º 2
0
            public override void Read()
            {
                try
                {
                    CCMinerCommandOutputs output = new CCMinerCommandOutputs();
                    string        result         = "";
                    TcpReaderUtil util           = new TcpReaderUtil(StatsLink, StatsPort);
                    result         = util.GetData("summary");
                    output.Summary = result;

                    result         = util.GetData("threads");
                    output.Threads = result;

                    string str = new JavaScriptSerializer().Serialize(output);


                    NextLog = str;
                }
                catch (Exception e)
                {
                    ReadWithBrowser();
                    throw;
                }
            }