Changeset View
Changeset View
Standalone View
Standalone View
src/i2p.cpp
Show First 20 Lines • Show All 230 Lines • ▼ Show 20 Lines | std::string Session::Reply::Get(const std::string &key) const { | ||||
throw std::runtime_error( | throw std::runtime_error( | ||||
strprintf("Missing %s= in the reply to \"%s\": \"%s\"", key, | strprintf("Missing %s= in the reply to \"%s\": \"%s\"", key, | ||||
request, full)); | request, full)); | ||||
} | } | ||||
return pos->second.value(); | return pos->second.value(); | ||||
} | } | ||||
template <typename... Args> | template <typename... Args> | ||||
void Session::Log(const std::string &fmt, const Args &... args) const { | void Session::Log(const std::string &fmt, const Args &...args) const { | ||||
LogPrint(BCLog::I2P, "I2P: %s\n", tfm::format(fmt, args...)); | LogPrint(BCLog::I2P, "I2P: %s\n", tfm::format(fmt, args...)); | ||||
} | } | ||||
Session::Reply Session::SendRequestAndGetReply(const Sock &sock, | Session::Reply Session::SendRequestAndGetReply(const Sock &sock, | ||||
const std::string &request, | const std::string &request, | ||||
bool check_result_ok) const { | bool check_result_ok) const { | ||||
sock.SendComplete(request + "\n", MAX_WAIT_FOR_IO, *m_interrupt); | sock.SendComplete(request + "\n", MAX_WAIT_FOR_IO, *m_interrupt); | ||||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |