Exemplo n.º 1
0
        public PingServer(StratumConnection stratumConnection, int interval = 10000)
        {
            CommandGlobalId = 1;

            _stratumConnection = stratumConnection;

            //_timer = new Timer(_ => { ConnectToServer(); }, null, 0, interval);
            ConnectToServer();
        }
Exemplo n.º 2
0
        public static StratumConnection Parse(AlgoNiceHashEnum algo, string stratumConnectionString)
        {
            var values = stratumConnectionString.Split(',');

            var connection = new StratumConnection {
                Algo = algo, Host = values[0], Port = int.Parse(values[1]), UserOrWallet = values[2], Worker = values[3], Password = values[4]
            };

            return(connection);
        }
Exemplo n.º 3
0
        public PingServer(StratumConnection stratumConnection, int interval = 1000)
        {
            _stratumConnection = stratumConnection;

            _timer = new Timer(_ => { ConnectToServer(); }, null, 0, interval);
        }