[#NetEventsInterface]
= NetEventsInterface
:mrdocs:

Interface for message handling

== Synopsis

Declared in `&lt;net&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class NetEventsInterface;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:NetEventsInterface/FinalizeNode.adoc[`FinalizeNode`]  [.small]#[virtual]#
| Handle removal of a peer (clear state)&period;
| xref:NetEventsInterface/HasAllDesirableServiceFlags.adoc[`HasAllDesirableServiceFlags`]  [.small]#[virtual]#
| Callback to determine whether the given set of service flags are sufficient for a peer to be &quot;relevant&quot;&period;
| xref:NetEventsInterface/InitializeNode.adoc[`InitializeNode`]  [.small]#[virtual]#
| Initialize a peer (setup state)&period;
| xref:NetEventsInterface/ProcessMessages.adoc[`ProcessMessages`]  [.small]#[virtual]#
| Process protocol messages received from a given node
| xref:NetEventsInterface/SendMessages.adoc[`SendMessages`]  [.small]#[virtual]#
| Send queued protocol messages to a given node&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:NetEventsInterface/g_msgproc_mutex.adoc[`g&lowbar;msgproc&lowbar;mutex`] 
| Mutex for anything that is only accessed via the msg processing thread
|===


== Protected Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:NetEventsInterface/2destructor.adoc[`&#126;NetEventsInterface`] [.small]#[destructor]#
| Protected destructor so that instances can only be deleted by derived classes&period; If that restriction is no longer desired, this should be made public and virtual&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:PeerManager.adoc[`PeerManager`] 
| Drives the peer&hyphen;to&hyphen;peer message processing and relay logic for a node&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
