| 42 | |
| 43 | |
| 44 | bool SetNonBlocking(Socket s) |
| 45 | { |
| 46 | #if defined(__unix__) || defined(__APPLE__) |
| 47 | const int currentFlags = fcntl(s, F_GETFL); |
| 48 | return fcntl(s, F_SETFL, currentFlags | O_NONBLOCK) == 0; |
| 49 | #elif defined(_MSC_VER) |
| 50 | u_long mode = 1; |
| 51 | return ioctlsocket(s, FIONBIO, &mode) == 0; |
| 52 | #elif defined(__MINGW32__) |
| 53 | u_long mode = 1; |
| 54 | return ioctlsocket(s, arm::pipe::numeric_cast<long>(FIONBIO), &mode) == 0; |
| 55 | #endif |
| 56 | } |
| 57 | |
| 58 | |
| 59 | long Write(Socket s, const void* buf, size_t len) |
no outgoing calls
no test coverage detected