Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | struct CSerializedNetMsg { | ||||
// No copying, only moves. | // No copying, only moves. | ||||
CSerializedNetMsg(const CSerializedNetMsg &msg) = delete; | CSerializedNetMsg(const CSerializedNetMsg &msg) = delete; | ||||
CSerializedNetMsg &operator=(const CSerializedNetMsg &) = delete; | CSerializedNetMsg &operator=(const CSerializedNetMsg &) = delete; | ||||
std::vector<uint8_t> data; | std::vector<uint8_t> data; | ||||
std::string m_type; | std::string m_type; | ||||
}; | }; | ||||
/** | |||||
* Different types of connections to a peer. This enum encapsulates the | |||||
* information we have available at the time of opening or accepting the | |||||
* connection. Aside from INBOUND, all types are initiated by us. | |||||
*/ | |||||
enum class ConnectionType { | enum class ConnectionType { | ||||
/** Peer initiated connections. */ | |||||
INBOUND, | INBOUND, | ||||
/** | |||||
* Full relay connections (blocks, addrs, txns) made automatically. | |||||
* Addresses selected from AddrMan. | |||||
*/ | |||||
OUTBOUND, | OUTBOUND, | ||||
/** | |||||
* Connections to addresses added via addnode or the connect command line | |||||
* argument. | |||||
*/ | |||||
MANUAL, | MANUAL, | ||||
/** Short lived connections used to test address validity. */ | |||||
FEELER, | FEELER, | ||||
/** | |||||
* Only relay blocks to these automatic outbound connections. | |||||
* Addresses selected from AddrMan. | |||||
*/ | |||||
BLOCK_RELAY, | BLOCK_RELAY, | ||||
/** | |||||
* Short lived connections used to solicit addrs when starting the node | |||||
* without a populated AddrMan. | |||||
*/ | |||||
ADDR_FETCH, | ADDR_FETCH, | ||||
}; | }; | ||||
namespace { | namespace { | ||||
struct CConnmanTest; | struct CConnmanTest; | ||||
} | } | ||||
class NetEventsInterface; | class NetEventsInterface; | ||||
▲ Show 20 Lines • Show All 942 Lines • Show Last 20 Lines |