| 45 | #ifdef _WIN32 |
| 46 | |
| 47 | static inline std::string wsaErrorCodeToString(int err) { |
| 48 | TCHAR buf[256] = {0}; |
| 49 | |
| 50 | FormatMessage( |
| 51 | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, nullptr, |
| 52 | err, 0, &(buf[0]), sizeof(buf) / sizeof(buf[0]), nullptr); |
| 53 | return util::tcharToUTF8String(buf); |
| 54 | } |
| 55 | |
| 56 | inline bool NetworkingSupport::m_start() { |
| 57 | WSADATA wsaData; |