mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 03:02:37 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user