Changeset View
Changeset View
Standalone View
Standalone View
src/net.h
Show First 20 Lines • Show All 874 Lines • ▼ Show 20 Lines | public: | ||||
bool fSentAddr{false}; | bool fSentAddr{false}; | ||||
CSemaphoreGrant grantOutbound; | CSemaphoreGrant grantOutbound; | ||||
std::atomic<int> nRefCount{0}; | std::atomic<int> nRefCount{0}; | ||||
const uint64_t nKeyedNetGroup; | const uint64_t nKeyedNetGroup; | ||||
std::atomic_bool fPauseRecv{false}; | std::atomic_bool fPauseRecv{false}; | ||||
std::atomic_bool fPauseSend{false}; | std::atomic_bool fPauseSend{false}; | ||||
bool IsOutboundOrBlockRelayConn() const { | |||||
switch (m_conn_type) { | |||||
case ConnectionType::OUTBOUND: | |||||
case ConnectionType::BLOCK_RELAY: | |||||
return true; | |||||
case ConnectionType::INBOUND: | |||||
case ConnectionType::MANUAL: | |||||
case ConnectionType::ADDR_FETCH: | |||||
case ConnectionType::FEELER: | |||||
return false; | |||||
} | |||||
assert(false); | |||||
} | |||||
bool IsFullOutboundConn() const { | bool IsFullOutboundConn() const { | ||||
return m_conn_type == ConnectionType::OUTBOUND; | return m_conn_type == ConnectionType::OUTBOUND; | ||||
} | } | ||||
bool IsManualConn() const { return m_conn_type == ConnectionType::MANUAL; } | bool IsManualConn() const { return m_conn_type == ConnectionType::MANUAL; } | ||||
bool IsBlockOnlyConn() const { | bool IsBlockOnlyConn() const { | ||||
return m_conn_type == ConnectionType::BLOCK_RELAY; | return m_conn_type == ConnectionType::BLOCK_RELAY; | ||||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |