Skip to content

Commit 46578c0

Browse files
committed
[doc] Describe different connection types
1 parent 442abae commit 46578c0

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/net.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,16 @@ struct CSerializedNetMsg
113113
std::string m_type;
114114
};
115115

116+
/** Different types of connections to a peer. This enum encapsulates the
117+
* information we have available at the time of opening or accepting the
118+
* connection. Aside from INBOUND, all types are initiated by us. */
116119
enum class ConnectionType {
117-
INBOUND,
118-
OUTBOUND,
119-
MANUAL,
120-
FEELER,
121-
BLOCK_RELAY,
122-
ADDR_FETCH,
120+
INBOUND, /**< peer initiated connections */
121+
OUTBOUND, /**< full relay connections (blocks, addrs, txns) made automatically. Addresses selected from AddrMan. */
122+
MANUAL, /**< connections to addresses added via addnode or the connect command line argument */
123+
FEELER, /**< short lived connections used to test address validity */
124+
BLOCK_RELAY, /**< only relay blocks to these automatic outbound connections. Addresses selected from AddrMan. */
125+
ADDR_FETCH, /**< short lived connections used to solicit addrs when starting the node without a populated AddrMan */
123126
};
124127

125128
class NetEventsInterface;

0 commit comments

Comments
 (0)