interface StratumProtocol
(source)
Handler capable of taking care of a connection to a Stratum server according to a specific flavor of the Stratum protocol.
canHandle |
Checks if the protocol can handle a TCP connection, based on the initial message. abstract fun canHandle(initialMessage: String, conn: StratumConnection): Boolean |
handle |
Handle a message over an established Stratum connection abstract fun handle(conn: StratumConnection, message: String): Unit |
onClose |
Callback when a stratum connection is closed. abstract fun onClose(conn: StratumConnection): Unit |
setCurrentWorkTask |
Sets the current proof-of-work job. abstract fun setCurrentWorkTask(input: PoWInput): Unit |
Stratum1EthProxyProtocol |
Implementation of the stratum1+tcp protocol. class Stratum1EthProxyProtocol : StratumProtocol |
Stratum1Protocol |
Implementation of the stratum+tcp protocol. class Stratum1Protocol : StratumProtocol |