Bitcoin Core  21.99.0
P2P Digital Currency
Public Member Functions | Protected Member Functions | List of all members
NetEventsInterface Class Referenceabstract

Interface for message handling. More...

#include <net.h>

Inheritance diagram for NetEventsInterface:
[legend]

Public Member Functions

virtual void InitializeNode (CNode *pnode)=0
 Initialize a peer (setup state, queue any initial messages) More...
 
virtual void FinalizeNode (const CNode &node)=0
 Handle removal of a peer (clear state) More...
 
virtual bool ProcessMessages (CNode *pnode, std::atomic< bool > &interrupt)=0
 Process protocol messages received from a given node. More...
 
virtual bool SendMessages (CNode *pnode) EXCLUSIVE_LOCKS_REQUIRED(pnode -> cs_sendProcessing)=0
 Send queued protocol messages to a given node. More...
 

Protected Member Functions

 ~NetEventsInterface ()=default
 Protected destructor so that instances can only be deleted by derived classes. More...
 

Detailed Description

Interface for message handling.

Definition at line 768 of file net.h.

Constructor & Destructor Documentation

◆ ~NetEventsInterface()

NetEventsInterface::~NetEventsInterface ( )
protecteddefault

Protected destructor so that instances can only be deleted by derived classes.

If that restriction is no longer desired, this should be made public and virtual.

Member Function Documentation

◆ FinalizeNode()

virtual void NetEventsInterface::FinalizeNode ( const CNode node)
pure virtual

Handle removal of a peer (clear state)

Here is the caller graph for this function:

◆ InitializeNode()

virtual void NetEventsInterface::InitializeNode ( CNode pnode)
pure virtual

Initialize a peer (setup state, queue any initial messages)

Here is the caller graph for this function:

◆ ProcessMessages()

virtual bool NetEventsInterface::ProcessMessages ( CNode pnode,
std::atomic< bool > &  interrupt 
)
pure virtual

Process protocol messages received from a given node.

Parameters
[in]pnodeThe node which we have received messages from.
[in]interruptInterrupt condition for processing threads
Returns
True if there is more work to be done
Here is the caller graph for this function:

◆ SendMessages()

virtual bool NetEventsInterface::SendMessages ( CNode pnode) -> cs_sendProcessing)
pure virtual

Send queued protocol messages to a given node.

Parameters
[in]pnodeThe node which we are sending messages to.
Returns
True if there is more work to be done
Here is the caller graph for this function:

The documentation for this class was generated from the following file: