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

@@ -100,7 +100,7 @@ public:
m_socket = INVALID_SOCKET - 1;
}
~StaticContentsSock() override { Reset(); }
~StaticContentsSock() override { m_socket = INVALID_SOCKET; }
StaticContentsSock& operator=(Sock&& other) override
{
@@ -108,11 +108,6 @@ public:
return *this;
}
void Reset() override
{
m_socket = INVALID_SOCKET;
}
ssize_t Send(const void*, size_t len, int) const override { return len; }
ssize_t Recv(void* buf, size_t len, int flags) const override