C# Class BitMaker.Miner.Pool

Encapsulates access to a mining pool.
Inheritance: IDisposable
Afficher le fichier Open project: wasabii/BitMaker

Méthodes publiques

Méthode Description
Dispose ( ) : void

Disposes of the pool and releases all resources associated with it.

GetWorkRpc ( IMiner miner, string comment ) : BitMaker.Miner.Work

Invokes the 'getwork' JSON method and parses the result into a new T:Work instance.

SubmitWorkRpc ( IMiner miner, BitMaker.Miner.Work work, string comment ) : bool

Invokes the 'getwork' JSON method, submitting the proposed work. Returns true if the service accepts the proposed work.

Private Methods

Méthode Description
GetWorkLp ( IMiner miner, string comment ) : BitMaker.Miner.Work

Initiates a long-poll request for work.

Open ( Uri url, string method, IMiner miner, string comment ) : HttpWebRequest

Opens a web request.

OpenLp ( IMiner miner, string comment ) : HttpWebRequest

Creates a HttpWebRequest for long-polling.

OpenRpc ( IMiner miner, string comment ) : HttpWebRequest

Creates a HttpWebRequest for JSON-RPC.

ParseGetWork ( WebResponse webResponse ) : BitMaker.Miner.Work

Parses a WebResponse containing the results of a 'getwork' request.

Pool ( Uri url ) : System

Initializes a new instance.

RefreshThreadMain ( ) : void

Entry point for thread responsible for detecting changes in the current block number.

Method Details

Dispose() public méthode

Disposes of the pool and releases all resources associated with it.
public Dispose ( ) : void
Résultat void

GetWorkRpc() public méthode

Invokes the 'getwork' JSON method and parses the result into a new T:Work instance.
public GetWorkRpc ( IMiner miner, string comment ) : BitMaker.Miner.Work
miner IMiner
comment string
Résultat BitMaker.Miner.Work

SubmitWorkRpc() public méthode

Invokes the 'getwork' JSON method, submitting the proposed work. Returns true if the service accepts the proposed work.
public SubmitWorkRpc ( IMiner miner, BitMaker.Miner.Work work, string comment ) : bool
miner IMiner
work BitMaker.Miner.Work
comment string
Résultat bool