9 #if defined(HAVE_CONFIG_H)
14 # error This header can only be compiled as C++.
17 #ifndef __INCLUDED_PROTOCOL_H__
18 #define __INCLUDED_PROTOCOL_H__
38 CMessageHeader(
const char* pszCommand,
unsigned int nMessageSizeIn);
55 MESSAGE_SIZE_SIZE=
sizeof(int),
56 CHECKSUM_SIZE=
sizeof(
int),
59 CHECKSUM_OFFSET=MESSAGE_SIZE_OFFSET+MESSAGE_SIZE_SIZE,
101 CAddress* pthis = const_cast<CAddress*>(
this);
107 if ((nType & SER_DISK) ||
108 (nVersion >= CADDR_TIME_VERSION && !(nType &
SER_GETHASH)))
133 CInv(
const std::string& strType,
const uint256& hashIn);
163 #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.
std::string ToString() const