Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 132 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; | ||||
}; | }; | ||||
const std::vector<std::string> CONNECTION_TYPE_DOC{ | |||||
"outbound-full-relay (default automatic connections)", | |||||
"block-relay-only (does not relay transactions or addresses)", | |||||
"inbound (initiated by the peer)", | |||||
"manual (added via addnode RPC or -addnode/-connect configuration options)", | |||||
"addr-fetch (short-lived automatic connection for soliciting addresses)", | |||||
"feeler (short-lived automatic connection for testing addresses)"}; | |||||
/** | /** | ||||
* Different types of connections to a peer. This enum encapsulates the | * Different types of connections to a peer. This enum encapsulates the | ||||
* information we have available at the time of opening or accepting the | * information we have available at the time of opening or accepting the | ||||
* connection. Aside from INBOUND, all types are initiated by us. | * connection. Aside from INBOUND, all types are initiated by us. | ||||
*/ | */ | ||||
enum class ConnectionType { | enum class ConnectionType { | ||||
/** | /** | ||||
* Inbound connections are those initiated by a peer. This is the only | * Inbound connections are those initiated by a peer. This is the only | ||||
▲ Show 20 Lines • Show All 593 Lines • ▼ Show 20 Lines | struct CNodeStats { | ||||
Amount minFeeFilter; | Amount minFeeFilter; | ||||
// Our address, as reported by the peer | // Our address, as reported by the peer | ||||
std::string addrLocal; | std::string addrLocal; | ||||
// Address of this peer | // Address of this peer | ||||
CAddress addr; | CAddress addr; | ||||
// Bind address of our side of the connection | // Bind address of our side of the connection | ||||
CAddress addrBind; | CAddress addrBind; | ||||
uint32_t m_mapped_as; | uint32_t m_mapped_as; | ||||
std::string m_conn_type_string; | |||||
}; | }; | ||||
/** | /** | ||||
* Transport protocol agnostic message container. | * Transport protocol agnostic message container. | ||||
* Ideally it should only contain receive time, payload, | * Ideally it should only contain receive time, payload, | ||||
* command and size. | * command and size. | ||||
*/ | */ | ||||
class CNetMessage { | class CNetMessage { | ||||
▲ Show 20 Lines • Show All 612 Lines • Show Last 20 Lines |