Raven Core  3.0.0
P2P Digital Currency
zmqpublishnotifier.h
Go to the documentation of this file.
1 // Copyright (c) 2015-2016 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_ZMQ_ZMQPUBLISHNOTIFIER_H
7 #define RAVEN_ZMQ_ZMQPUBLISHNOTIFIER_H
8 
9 #include "zmqabstractnotifier.h"
10 
11 class CBlockIndex;
12 class CMessage;
13 
15 {
16 private:
17  uint32_t nSequence;
18 
19 public:
20 
21  /* send zmq multipart message
22  parts:
23  * command
24  * data
25  * message sequence number
26  */
27  bool SendMessage(const char *command, const void* data, size_t size);
28 
29  bool Initialize(void *pcontext) override;
30  void Shutdown() override;
31 };
32 
34 {
35 public:
36  bool NotifyBlock(const CBlockIndex *pindex) override;
37 };
38 
40 {
41 public:
42  bool NotifyTransaction(const CTransaction &transaction) override;
43 };
44 
46 {
47 public:
48  bool NotifyBlock(const CBlockIndex *pindex) override;
49 };
50 
52 {
53 public:
54  bool NotifyTransaction(const CTransaction &transaction) override;
55 };
56 
58 {
59 public:
60  bool NotifyMessage(const CMessage& message) override;
61 };
62 
63 #endif // RAVEN_ZMQ_ZMQPUBLISHNOTIFIER_H
uint32_t nSequence
upcounting per message sequence number
virtual bool NotifyBlock(const CBlockIndex *pindex)
virtual bool NotifyTransaction(const CTransaction &transaction)
bool SendMessage(const char *command, const void *data, size_t size)
virtual bool NotifyMessage(const CMessage &message)
The block chain is a tree shaped structure starting with the genesis block at the root...
Definition: chain.h:172
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:270
bool Initialize(void *pcontext) override