Specifies how this instance discovers and connects to peers, including network settings and authentication options.
More...
|
| enum class | Type { server
, small_peers_only
} |
| | Connection configuration type.
|
| |
|
|
virtual Type | get_type () const =0 |
| |
|
| static std::shared_ptr< Connect > | server (std::string url) |
| | Factory method to create a server connection.
|
| |
| static std::shared_ptr< Connect > | small_peers_only (std::string private_key="") |
| | Factory method to create a small-peers-only connection.
|
| |
Specifies how this instance discovers and connects to peers, including network settings and authentication options.
This is a substructure of DittoConfig.
Connect is an abstract class. Concrete derived classes are ServerConnect and SmallPeersOnlyConnect.
◆ server()
| static std::shared_ptr< Connect > ditto::DittoConfig::Connect::server |
( |
std::string | url | ) |
|
|
static |
Factory method to create a server connection.
- Parameters
-
- Returns
- A shared pointer to a Connect instance configured for server connection
◆ small_peers_only()
| static std::shared_ptr< Connect > ditto::DittoConfig::Connect::small_peers_only |
( |
std::string | private_key = "" | ) |
|
|
static |
Factory method to create a small-peers-only connection.
- Parameters
-
| private_key | Optional private key for encryption (empty string means no encryption) |
- Returns
- A shared pointer to a Connect instance configured for small peers only