MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / set_non_blocking

Function set_non_blocking

libminifi/src/io/ClientSocket.cpp:122–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120#endif /* !WIN32 */
121
122std::error_code set_non_blocking(const minifi::io::SocketDescriptor fd) noexcept {
123#ifndef WIN32
124 if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {
125 return { errno, std::generic_category() };
126 }
127#else
128 u_long iMode = 1;
129 if (ioctlsocket(fd, FIONBIO, &iMode) == SOCKET_ERROR) {
130 return { WSAGetLastError(), std::system_category() };
131 }
132#endif /* !WIN32 */
133 return {};
134}
135} // namespace
136
137namespace org {

Callers 1

initializeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected