Changeset View
Changeset View
Standalone View
Standalone View
src/netbase.cpp
Show First 20 Lines • Show All 616 Lines • ▼ Show 20 Lines | #endif | ||||
return std::make_unique<Sock>(hSocket); | return std::make_unique<Sock>(hSocket); | ||||
} | } | ||||
std::function<std::unique_ptr<Sock>(const CService &)> CreateSock = | std::function<std::unique_ptr<Sock>(const CService &)> CreateSock = | ||||
CreateSockTCP; | CreateSockTCP; | ||||
template <typename... Args> | template <typename... Args> | ||||
static void LogConnectFailure(bool manual_connection, const char *fmt, | static void LogConnectFailure(bool manual_connection, const char *fmt, | ||||
const Args &... args) { | const Args &...args) { | ||||
std::string error_message = tfm::format(fmt, args...); | std::string error_message = tfm::format(fmt, args...); | ||||
if (manual_connection) { | if (manual_connection) { | ||||
LogPrintf("%s\n", error_message); | LogPrintf("%s\n", error_message); | ||||
} else { | } else { | ||||
LogPrint(BCLog::NET, "%s\n", error_message); | LogPrint(BCLog::NET, "%s\n", error_message); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 224 Lines • Show Last 20 Lines |