net: rename Sock::Reset() to Sock::Close() and make it private

Outside of `Sock`, `Sock::Reset()` was used in just one place (in
`i2p.cpp`) which can use the assignment operator instead.

This simplifies the public `Sock` API by having one method less.
This commit is contained in:
Vasil Dimov
2022-06-21 15:23:37 +02:00
parent e8ff3f0c52
commit a724c39606
7 changed files with 28 additions and 46 deletions

View File

@@ -69,14 +69,6 @@ BOOST_AUTO_TEST_CASE(move_assignment)
BOOST_CHECK(SocketIsClosed(s));
}
BOOST_AUTO_TEST_CASE(reset)
{
const SOCKET s = CreateSocket();
Sock sock(s);
sock.Reset();
BOOST_CHECK(SocketIsClosed(s));
}
#ifndef WIN32 // Windows does not have socketpair(2).
static void CreateSocketPair(int s[2])