MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / NetworkErrorString

Function NetworkErrorString

src/netbase.cpp:652–666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

650
651#ifdef WIN32
652std::string NetworkErrorString(int err)
653{
654 char buf[256];
655 buf[0] = 0;
656 if(FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK,
657 nullptr, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
658 buf, sizeof(buf), nullptr))
659 {
660 return strprintf("%s (%d)", buf, err);
661 }
662 else
663 {
664 return strprintf("Unknown error (%d)", err);
665 }
666}
667#else
668std::string NetworkErrorString(int err)
669{

Callers 8

CreateSocketFunction · 0.85
ConnectSocketDirectlyFunction · 0.85
CloseSocketFunction · 0.85
SocketSendDataMethod · 0.85
AcceptConnectionMethod · 0.85
ThreadSocketHandlerMethod · 0.85
BindListenPortMethod · 0.85
StopMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected