aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2022-07-05 12:20:42 +0200
committerVasil Dimov <vd@FreeBSD.org>2022-07-20 16:26:24 +0200
commit29f66f76826056f53d971ac734b7ed49b39848d3 (patch)
tree6bb5fe27880dc8c584ce7297afdbc654610975a7 /src/netbase.cpp
parentb4bac556791b5bb8aa118d4c1fed42c3fe45550c (diff)
moveonly: move SetSocketNonBlocking() from netbase to util/sock
To be converted to a method of the `Sock` class.
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 22cf4415c8..b13d6b1ae0 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -717,21 +717,6 @@ bool LookupSubNet(const std::string& subnet_str, CSubNet& subnet_out)
return false;
}
-bool SetSocketNonBlocking(const SOCKET& hSocket)
-{
-#ifdef WIN32
- u_long nOne = 1;
- if (ioctlsocket(hSocket, FIONBIO, &nOne) == SOCKET_ERROR) {
-#else
- int fFlags = fcntl(hSocket, F_GETFL, 0);
- if (fcntl(hSocket, F_SETFL, fFlags | O_NONBLOCK) == SOCKET_ERROR) {
-#endif
- return false;
- }
-
- return true;
-}
-
void InterruptSocks5(bool interrupt)
{
interruptSocks5Recv = interrupt;