Changeset View
Changeset View
Standalone View
Standalone View
src/seeder/bitcoin.h
Show All 22 Lines | |||||
enum class PeerMessagingState { | enum class PeerMessagingState { | ||||
AwaitingMessages, | AwaitingMessages, | ||||
Finished, | Finished, | ||||
}; | }; | ||||
class CSeederNode { | class CSeederNode { | ||||
private: | private: | ||||
SOCKET sock; | SOCKET sock; | ||||
CDataStream vSend; | |||||
CDataStream vRecv; | CDataStream vRecv; | ||||
uint32_t nHeaderStart; | uint32_t nHeaderStart; | ||||
uint32_t nMessageStart; | uint32_t nMessageStart; | ||||
int nVersion; | int nVersion; | ||||
std::string strSubVer; | std::string strSubVer; | ||||
int nStartingHeight; | int nStartingHeight; | ||||
std::vector<CAddress> *vAddr; | std::vector<CAddress> *vAddr; | ||||
int ban; | int ban; | ||||
Show All 10 Lines | private: | ||||
void Send(); | void Send(); | ||||
void PushVersion(); | void PushVersion(); | ||||
bool ProcessMessages(); | bool ProcessMessages(); | ||||
protected: | protected: | ||||
CDataStream vSend; | |||||
deadalnix: This is changing the layout, maybe it is preferable to make a protcted accessor.
Alternatively… | |||||
PeerMessagingState ProcessMessage(std::string strCommand, | PeerMessagingState ProcessMessage(std::string strCommand, | ||||
CDataStream &recv); | CDataStream &recv); | ||||
public: | public: | ||||
CSeederNode(const CService &ip, std::vector<CAddress> *vAddrIn); | CSeederNode(const CService &ip, std::vector<CAddress> *vAddrIn); | ||||
bool Run(); | bool Run(); | ||||
Show All 10 Lines |
This is changing the layout, maybe it is preferable to make a protcted accessor.
Alternatively, make a friend class like it is done for ConnMan or avalanche::Processor.