diff options
author | Anthony Towns <aj@erisian.com.au> | 2022-08-31 17:04:13 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2022-09-01 20:52:20 +1000 |
commit | 9dccc3328eeaf9cd66518d812c878def5d014e36 (patch) | |
tree | 6e99582202e272de78d70e4722e5e258b90677f6 /src/net.h | |
parent | 52dcb1d2a319a34202fc1b21c3a137d45cb010b4 (diff) |
net: add CNodeOptions for optional CNode constructor params
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -334,6 +334,11 @@ public: void prepareForTransport(CSerializedNetMsg& msg, std::vector<unsigned char>& header) const override; }; +struct CNodeOptions +{ + std::unique_ptr<i2p::sam::Session> i2p_sam_session = nullptr; +}; + /** Information about a peer */ class CNode { @@ -522,7 +527,7 @@ public: const std::string& addrNameIn, ConnectionType conn_type_in, bool inbound_onion, - std::unique_ptr<i2p::sam::Session>&& i2p_sam_session = nullptr); + CNodeOptions&& node_opts = {}); CNode(const CNode&) = delete; CNode& operator=(const CNode&) = delete; |