7 # error This header can only be compiled as C++.
10 #ifndef __INCLUDED_PROTOCOL_H__
11 #define __INCLUDED_PROTOCOL_H__
31 CMessageHeader(
const char* pszCommand,
unsigned int nMessageSizeIn);
48 MESSAGE_SIZE_SIZE=
sizeof(
int),
49 CHECKSUM_SIZE=
sizeof(
int),
52 CHECKSUM_OFFSET=MESSAGE_SIZE_OFFSET+MESSAGE_SIZE_SIZE,
78 CAddress* pthis = const_cast<CAddress*>(
this);
84 if ((nType & SER_DISK) ||
110 CInv(
const std::string& strType,
const uint256& hashIn);
140 #endif // __INCLUDED_PROTOCOL_H__
IMPLEMENT_SERIALIZE(CAddress *pthis=const_cast< CAddress * >(this);CService *pip=(CService *) pthis;if(fRead) pthis->Init();if(nType &SER_DISK) READWRITE(nVersion);if((nType &SER_DISK)||(nVersion >=CADDR_TIME_VERSION &&!(nType &SER_GETHASH))) READWRITE(nTime);READWRITE(nServices);READWRITE(*pip);) void print() const
const char * GetCommand() const
IMPLEMENT_SERIALIZE(READWRITE(type);READWRITE(hash);) friend bool operator<(const CInv &a
#define IMPLEMENT_SERIALIZE(statements)
#define MESSAGE_START_SIZE
A combination of a network address (CNetAddr) and a (TCP) port.
A CService with information about it as peer.
static const int CADDR_TIME_VERSION
std::string ToString() const