Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
i2p::sam::Session::Reply Struct Reference

A reply from the SAM proxy. More...

Public Member Functions

std::string Get (const std::string &key) const
 Get the value of a given key. More...
 

Public Attributes

std::string full
 Full, unparsed reply. More...
 
std::string request
 Request, used for detailed error reporting. More...
 
std::unordered_map< std::string, std::optional< std::string > > keys
 A map of keywords from the parsed reply. More...
 

Detailed Description

A reply from the SAM proxy.

Definition at line 126 of file i2p.h.

Member Function Documentation

◆ Get()

std::string i2p::sam::Session::Reply::Get ( const std::string &  key) const

Get the value of a given key.

For example if the reply is "A=X B" then: Value("A") -> "X" Value("B") -> throws Value("C") -> throws

Parameters
[in]keyKey whose value to retrieve
Returns
the key's value
Exceptions
std::runtime_errorif the key is not present or if it has no value

Definition at line 282 of file i2p.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ full

std::string i2p::sam::Session::Reply::full

Full, unparsed reply.

Definition at line 130 of file i2p.h.

◆ keys

std::unordered_map<std::string, std::optional<std::string> > i2p::sam::Session::Reply::keys

A map of keywords from the parsed reply.

For example, if the reply is "A=X B C=YZ", then the map will be keys["A"] == "X" keys["B"] == (empty std::optional) keys["C"] == "YZ"

Definition at line 144 of file i2p.h.

◆ request

std::string i2p::sam::Session::Reply::request

Request, used for detailed error reporting.

Definition at line 135 of file i2p.h.


The documentation for this struct was generated from the following files: