Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
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.
 

Public Attributes

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

Detailed Description

A reply from the SAM proxy.

Definition at line 119 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 228 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 123 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 137 of file i2p.h.

◆ request

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

Request, used for detailed error reporting.

Definition at line 128 of file i2p.h.


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