i2p::sam::Session::Session

Constructors

Synopses

Declared in <i2p.h>

Construct a transient session which will generate its own I2P private key rather than read the one from disk (it will not be saved on disk either and will be lost once this object is destroyed). This will not initiate any IO, the session will be lazily created later when first used.

Session(
    Proxy const& control_host,
    std::shared_ptr<CThreadInterrupt> interrupt);
» more...

Construct a session. This will not initiate any IO, the session will be lazily created later when first used.

Session(
    fs::path const& private_key_file,
    Proxy const& control_host,
    std::shared_ptr<CThreadInterrupt> interrupt);
» more...

Parameters

NameDescription
control_host [in]Location of the SAM proxy.
interrupt [inout]If this is signaled then all operations are canceled as soon as possible and executing methods throw an exception.
private_key_file [in]Path to a private key file. If the file does not exist then the private key will be generated and saved into the file.