diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2022-06-21 15:23:37 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2022-06-22 09:19:43 +0200 |
commit | a724c39606273dfe4c6f9887ef8b77d0a98f1b34 (patch) | |
tree | 092db93c07cbfce5dd25cc5353a342197390a619 /src/test/util | |
parent | e8ff3f0c52e7512a580bc907dc72e5bb141b4217 (diff) |
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.
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/net.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/test/util/net.h b/src/test/util/net.h index 37d278645a..edb45d7c8e 100644 --- a/src/test/util/net.h +++ b/src/test/util/net.h @@ -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 |