1 // Copyright (c) 2015-2016 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
6 #define BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
8 #include <zmq/zmqabstractnotifier.h>
12 class CZMQAbstractPublishNotifier
: public CZMQAbstractNotifier
15 uint32_t nSequence
; //!< upcounting per message sequence number
19 /* send zmq multipart message
23 * message sequence number
25 bool SendMessage(const char *command
, const void* data
, size_t size
);
27 bool Initialize(void *pcontext
) override
;
28 void Shutdown() override
;
31 class CZMQPublishHashBlockNotifier
: public CZMQAbstractPublishNotifier
34 bool NotifyBlock(const CBlockIndex
*pindex
) override
;
37 class CZMQPublishHashTransactionNotifier
: public CZMQAbstractPublishNotifier
40 bool NotifyTransaction(const CTransaction
&transaction
) override
;
43 class CZMQPublishRawBlockNotifier
: public CZMQAbstractPublishNotifier
46 bool NotifyBlock(const CBlockIndex
*pindex
) override
;
49 class CZMQPublishRawTransactionNotifier
: public CZMQAbstractPublishNotifier
52 bool NotifyTransaction(const CTransaction
&transaction
) override
;
55 #endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H