forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: Add a CMessageProcessorInterface and use it instead of boost sig…
…nals
- Loading branch information
Showing
6 changed files
with
156 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) 2009-2010 Satoshi Nakamoto | ||
// Copyright (c) 2009-2015 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#ifndef BITCOIN_MESSAGE_INTERFACE_H | ||
#define BITCOIN_MESSAGE_INTERFACE_H | ||
|
||
typedef int NodeId; | ||
|
||
class CConnman; | ||
class CNode; | ||
class CMessageProcessorInterface | ||
{ | ||
public: | ||
virtual ~CMessageProcessorInterface() = default; | ||
virtual void OnStartup(CConnman* connman) = 0; | ||
virtual void OnShutdown(CConnman* connman) = 0; | ||
virtual bool ProcessMessages(CNode* pfrom) = 0; | ||
virtual bool SendMessages(CNode* pto) = 0; | ||
virtual void InitializeNode(CNode *pnode) = 0; | ||
virtual void FinalizeNode(NodeId nodeid, bool& fUpdateConnectionTime) = 0; | ||
}; | ||
|
||
#endif // BITCOIN_MESSAGE_INTERFACE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.