MCPcopy Create free account
hub / github.com/LUX-Core/lux / NetworkErrorString

Function NetworkErrorString

src/netbase.cpp:1326–1337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1324
1325#ifdef WIN32
1326std::string NetworkErrorString(int err)
1327{
1328 char buf[256];
1329 buf[0] = 0;
1330 if (FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK,
1331 NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
1332 buf, sizeof(buf), NULL)) {
1333 return strprintf("%s (%d)", buf, err);
1334 } else {
1335 return strprintf("Unknown error (%d)", err);
1336 }
1337}
1338#else
1339std::string NetworkErrorString(int err)
1340{

Callers 7

ConnectSocketDirectlyFunction · 0.85
RecvLineFunction · 0.85
SocketSendDataFunction · 0.85
AcceptConnectionFunction · 0.85
ThreadSocketHandlerFunction · 0.85
BindListenPortFunction · 0.85
~CNetCleanupMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected