From dec9b5e850c6aad989e814aea5b630b36f55d580 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Mon, 4 Jan 2021 13:02:43 +0100 Subject: net: move CloseSocket() from netbase to util/sock Move `CloseSocket()` (and `NetworkErrorString()` which it uses) from `netbase.{h,cpp}` to newly added `src/util/sock.{h,cpp}`. This is necessary in order to use `CloseSocket()` from a newly introduced Sock class (which will live in `src/util/sock.{h,cpp}`). `sock.{h,cpp}` cannot depend on netbase because netbase will depend on it. --- src/netbase.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/netbase.h') diff --git a/src/netbase.h b/src/netbase.h index 3dc656d0db..38d33e475b 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -54,10 +54,6 @@ bool LookupSubNet(const std::string& strSubnet, CSubNet& subnet); SOCKET CreateSocket(const CService &addrConnect); bool ConnectSocketDirectly(const CService &addrConnect, const SOCKET& hSocketRet, int nTimeout, bool manual_connection); bool ConnectThroughProxy(const proxyType &proxy, const std::string& strDest, int port, const SOCKET& hSocketRet, int nTimeout, bool& outProxyConnectionFailed); -/** Return readable error string for a network error code */ -std::string NetworkErrorString(int err); -/** Close socket and set hSocket to INVALID_SOCKET */ -bool CloseSocket(SOCKET& hSocket); /** Disable or enable blocking-mode for a socket */ bool SetSocketNonBlocking(const SOCKET& hSocket, bool fNonBlocking); /** Set the TCP_NODELAY flag on a socket */ -- cgit v1.2.3